Part Number Hot Search : 
2SC4151 D2544 MTN1136 TB0613A MZ130 196JQ 220AMC16 A5800934
Product Description
Full Text Search
 

To Download TMP92CF26AXBG Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 TOSHIBA Original CMOS 32-Bit Microcontroller
TLCS-900/H1 Series
TMP92CF26AXBG
Semiconductor Company
TMP92CF26A
CMOS 32-Bit Microcontroller
TMP92CF26AXBG 1. Outline and Features
The TMP92CF26A is a high-speed advanced 32-bit microcontroller developed for controlling equipment which processes mass data. The TMP92CF26AXBG is housed in a 228-pin BGA package. (1) CPU: 32-bit CPU (High-speed 900/H1 CPU) * * * * Compatible with TLCS-900/L1 instruction code 16 Mbytes of linear address space General-purpose register and register banks Micro DMA: 8channels (62.5 ns/4 bytes at fSYS = 80 MHz, best case)
(2) Minimum instruction execution time: 12.5 ns (at fSYS = 80 MHz) (3) Internal RAM: 144 Kbytes (can be used for program, data and display memory) Internal ROM: 8 Kbytes (memory for Boot only) Possible downloading of user program through either USB, UART.
RESTRICTIONS ON PRODUCT USE
* The information contained herein is subject to change without notice.
20070701-EN
* TOSHIBA is continually working to improve the quality and reliability of its products. Nevertheless, semiconductor devices in general can malfunction or fail due to their inherent electrical sensitivity and vulnerability to physical stress. It is the responsibility of the buyer, when utilizing TOSHIBA products, to comply with the standards of safety in making a safe design for the entire system, and to avoid situations in which a malfunction or failure of such TOSHIBA products could cause loss of human life, bodily injury or damage to property. In developing your designs, please ensure that TOSHIBA products are used within specified operating ranges as set forth in the most recent TOSHIBA products specifications. Also, please keep in mind the precautions and conditions set forth in the "Handling Guide for Semiconductor Devices," or "TOSHIBA Semiconductor Reliability Handbook" etc. * The TOSHIBA products listed in this document are intended for usage in general electronics applications (computer, personal equipment, office equipment, measuring equipment, industrial robotics, domestic appliances, etc.).These TOSHIBA products are neither intended nor warranted for usage in equipment that requires extraordinarily high quality and/or reliability or a malfunction or failure of which may cause loss of human life or bodily injury ("Unintended Usage"). Unintended Usage include atomic energy control instruments, airplane or spaceship instruments, transportation instruments, traffic signal instruments, combustion control instruments, medical instruments, all types of safety devices, etc.. Unintended Usage of TOSHIBA products listed in his document shall be made at the customer's own risk. * The products described in this document shall not be used or embedded to any downstream products of which manufacture, use and/or sale are prohibited under any applicable laws and regulations. * The information contained herein is presented only as a guide for the applications of our products. No responsibility is assumed by TOSHIBA for any infringements of patents or other rights of the third parties which may result from its use. No license is granted by implication or otherwise under any patents or other rights of TOSHIBA or the third parties. * Please contact your sales representative for product-by-product details in this document regarding RoHS compatibility. Please use these products in this document in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances. Toshiba assumes no liability for damage or losses occurring as a result of noncompliance with applicable laws and regulations.
92CF26A-1
2007-11-21
TMP92CF26A
(4) External memory expansion * * * * * Expandable up to 3.1 Gbytes (shared program/data area) Can simultaneously support 8-and 16-bit width external data buses ...... Dynamic data bus sizing Separate bus system Chip select output: 4 channels One channel in 4 channels is enabled detailed AC enable setting
(5) Memory controller
(6) 8-bit timers: 8 channels (7) 16-bit timer/event counter: 2 channels (8) General-purpose serial interface: 1 channel * * UART/synchronous mode IrDA ver.1.0 (115.2 kbps) selectable (There is the restriction in the setting baud rate when use this function together other functions) (9) Serial bus interface: 1 channel * * * * I2C bus mode only Supports USB (ver.1.1) Full-speed (12 Mbps) (Low-speed is not supported.) Endpoint 0: Control 64 bytes x 1 FIFO Endpoint 1: BULK (output) 64 bytes x 2 FIFOs Endpoint 2: BULK (input) 64 bytes x 2 FIFOs Endpoint 3: Interrupt (input) 8 bytes x 1 FIFO * * * * * * * * * * * Descriptor RAM: 384 bytes I2S bus mode selectable (Master, transmission only) Data Format is supported Left/Right Justify 128-byte FIFO buffer (64 bytes x 2) per channel Supports monochrome, 4, 16 and 64 gray levels and 256/4096/65536 colors for STN Supports 4096/65536/262144/16777216 colors for TFT Supports PIP (Picture In Picture Display) Supports H/W Rotation function for support to various LCDM Supports 16-Mbit, 64-Mbit, 128-Mbit, 256-Mbit and 512-Mbit SDR (Single-data-rate) SDRAM Possible to execute instruction on SDRAM Based on TC8521A (11) I2S (Inter-IC Sound)interface: 2 channels (10) USB (universal serial bus) controller: 1 channel
(12) LCD controller
(13) SDRAM controller: 1 channel
(14) Timer for real-time clock (RTC)
92CF26A-2
2007-11-21
TMP92CF26A
(15) Key-on wakeup (Interrupt key input) (16) 10-bit A/D converter (Built in Sample Hold circuit): 6 channels (17) Touch screen interface * Built-in Switch of Low-resistor, and available to reduce external components for shift change row/column
(18) Watchdog timer (19) Melody/alarm generator * * * * * Melody: Output of a clock 4 to 5461-Hz clock Alarm: Output of 8 kinds of alarm pattern 5 kinds of interval interrupt Expandable up to 3.1 Gbytes (3 local area/8 bank method) Independent bank for each program, read data, write data, source and destination of DMAC (Odd channel/Even channel) and LCD display data 9 CPU interrupts: Software interrupt instruction and illegal instruction 38 internal interrupts: Seven selectable priority levels 9 external interrupts: Seven selectable priority levels (8-edge selectable) High-speed data transfer enable by controlling which convert micro DMA function and this function
(20) MMU
(21) Interrupts: 56 interrupts * * * *
(22) DMAC function: 6 channels
(23) Input/Output ports: 136 pins (Except Data bus (16-bit), Address bus (24-bit) and RD pin) (24) NAND Flash interface: 2 channels * * * * Direct NAND flash connection capability Supports SLC type and MLC type Supports Data Bus 8/16 bits, Page Size 512/2048 bytes Built-in Reed Solomon calculation circuits which enabled correct 4-address, and detect error more than 5-address Supports SPI mode of SD card and MMC card Built-in FIFO buffer of 32 bytes to each Input/Output Supports calculation 32 x 32 + 64 = 64 bits, 64 - 32 x 32 = 64 bits and 32 x 32 - 64 =64 bits I/O method Supports Signed calculations
(25) SPI controller: 1 channel * * * * *
(26) Product/Sum calculation: 1 channel
92CF26A-3
2007-11-21
TMP92CF26A
(27) Standby function * * * * * * * * * Three Halt modes: IDLE2 (programmable), IDLE1, STOP Each pin status programmable for standby mode Built-in power supply management circuits (PMC) for leakage current provision Two blocks of clock doubler (PLL) supplies 48 MHz for USB and 80 MHz for CPU from 10 MHz Clock gear function: Selectable high-frequency clock fc to fc/16 Clock for Timer (fs = 32.768 kHz) Internal VCC= 1.5 V, External I/O Vcc = 3.0 to 3.6 V 2 power supplies (Internal power supply (1.4 to 1.6 V), External power supply (3.0 to 3.6 V) 228-pin FBGA: P-FBGA228-1515-0.80A5
(28) Clock controller
(29) Operating voltage:
(30) Package
92CF26A-4
2007-11-21
TMP92CF26A
(AN0 to AN1)PG0 to PG1 (AN2, MX)PG2 (AN3, MY, ADTRG )PG3 (AN4 to AN5)PG4 to PG5 AVCC, AVSS VREFH, VREFL (PX, INT4) P96
10-bit 6ch AD Converter XWA
Touch Screen I/F (TSI)
900/H1 CPU PLL H-OSC Clock gear L-OSC
DVCC3A [12] DVCC3B [1] DVCC1A [5] DVCC1B [1] DVSSCOM
W B D H IX IY IZ SP 32bit SR PC
A C E L
XBC XDE XHL XIX XIY XIZ XSP
DVCC1C [1] DVSS1C [1] X1 X2 XT1 XT2
RESET DBGE
(PY) P97 (TXD0) P90 (RXD0) P91
(CTS0, SCLK0) P92
SERIAL I/O SIO0 I2S (I S0)
2
(I2S0CKO) PF0 (I2S0DO) PF1 (I2S0WS) PF2 (I2S1CKO) PF3 (I2S1DO) PF4 (I2S1WS) PF5 (SDA) PV6 (SCL) PV7 D+ D(X1USB) PX5 (TA0IN, INT1) PC1
(TA1OUT, MLDALM) PM1
AM [1:0]
PZ0 (EI_PODDATA) PZ1 (EI_SYNCLK) PZ2 (EI_PODREQ) PZ3 (EI_REFCLK) PZ4 (EI_TRGIN) PZ5 (EI_COMRESET) PZ6 (EO_MCUDATA) PZ7 (EO_MCUREQ) PM7 (PWE) PC0 (INT0) PC2 (INT2)
D0 to D7 P10 to P17 (D8 to D15)
IS (I2S1)
SBI (I Cbus) USB Controller 8BIT TIMER (TMRA0) 8BIT TIMER (TMRA1) 8BIT TIMER (TMRA2) 8BIT TIMER (TMRA3) 8BIT TIMER (TMRA4) 8BIT TIMER (TMRA5) 8BIT TIMER (TMRA6) 8BIT TIMER (TMRA7) 16BIT TIMER (TMRB0) 16BIT TIMER (TMRB1)
2
2
DSU F
PMC WATCH-DOG TIMER MMU MAC DMAC Interrupt Controller PORT1 PORT4 PORT5 PORT6 PORT7
(TA2IN, INT3) PC3 (TA3OUT) PP1
P40 to P47 (A0 to A7) P50 to P57 (A8 to A15) P60 to P67 (A16 to A23)
P70 ( RD ) P73 (EA24) P74 (EA25) P75 (R/ W , NDR/ B ) P76 ( WAIT ) P80 ( CS0 ) P81 ( CS1 , SDCS ) P82 ( CS2 , CSZA , SDCS ) P83 ( CS3 , CSXA ) P84 ( CSZB ) P85 ( CSZC ) P71 ( WRLL , NDRE ) P72 ( WRLU , NDWE ) P86 ( CSZD , ND0CE ) P87 ( CSXB , ND1CE ) PJ5 (NDALE) PJ6 (NDCLE) PA0 to PA7 (KI0 to KI7) PN0 to PN7 (KO0 to KO7) PC7 (KO8)
(TA5OUT) PP2
(TA7OUT, INT5) PP3 (TB0IN0, INT6) PP4 (TB0OUT0) PP6 (TB1IN0, INT7) PP5 (TB1OUT0) PP7 (SPDI) PR0 (SPDO) PR1 ( SPCS ) PR2 (SPCLK) PR3 (LCP0) PK0 (LLOAD) PK1 (LFR) PK2 (LVSYNC) PK3 (LHSYNC) PK4 (LGOE2 to 0) PK7 to 5 (LD7 to 0) PL7 to 0 (LD15 to 8) PT7 to 0 (LD22 to 16) PU6 to 0
(LD23, EO_TRGOUT) PU7
PORT8
SPI Controller 144KB RAM
NAND-FLASH I/F (2ch)
LCD Controller BOOT ROM 8KB
KEY-BOARD I/F
RTC
MELODY/ ALARM-OUT
PM2 ( ALARM , MLDALM )
(CLKOUT, LDIV) PX4 PX7 ( SDRAS , SRLLB ) PJ0 ( SDCAS , SRLUB ) PJ1 ( SDWE , SRWR ) PJ2 (SDLLDQM) PJ3 (SDLUDQM) PJ4 (SDCKE) PJ7 (SDCLK) PF7
PORTV SDRAM Controller
PV3 PV4 PV0 (SCLK0) PV1 PV2 PW7 to PW0 PC4 (EA26) PC5 (EA27) PC6 (EA28)
Figure 1.1 Block Diagram of TMP92CF26A
92CF26A-5
2007-11-21
TMP92CF26A
2.
Pin Assignment and Pin Functions
The assignment of input/output pins for TMP92CF26A, their names and functions are as follows;
2.1
Pin Assignment Diagram (Top View)
Figure 2.1.1 shows the pin assignment of the TMP92CF26A. A1 B1 C1 D1 E1 F1 A2 B2 C2 D2 E2 F2 A3 B3 C3 D3 E3 F3 E4 F4 F6 F7 F8 F9 F10 F11 G12 H12 A4 B4 C4 A5 B5 C5 D5 A6 B6 C6 D6 A7 B7 C7 D7 A8 B8 C8 D8 A9 A10 A11 A12 A13 A14 A15 A16 A17 B9 B10 B11 B12 B13 B14 B15 B16 B17 C9 C10 C11 C12 C13 C14 C15 C16 C17 D9 D10 D11 D12 D13 D15 D16 D17 E14 E15 E16 E17 F14 F15 F16 F17 G14 G15 G16 G17 H14 H15 H16 H17 J14 J15 J16 J17 K14 K15 K16 K17 L14 L15 L16 L17 M14 M15 M16 M17 N14 N15 N16 N17 P5 R4 T4 U4 R5 T5 U5 P6 R6 T6 U6 P7 R7 T7 U7 P8 R8 T8 U8 P9 P10 P11 P12 P13 P15 P16 P17
G1 G2 G3 G4 H1 J1 K1 L1 H2 J2 K2 L2 H3 J3 K3 L3 H4 J4 K4 L4
G6 G7 H6 J6 K6 L6
TMP92CF26A
P-FBGA228
J12 K12 L12
TOP VIEW
M1 M2 M3 M4 N1 P1 R1 T1 U1 N2 P2 R2 T2 U2 N3 P3 R3 T3 U3 N4
M6 M7 M8 M9 M10 M11 M12
R9 R10 R11 R12 R13 R14 R15 R16 R17 T9 T10 T11 T12 T13 T14 T15 T16 T17 U9 U10 U11 U12 U13 U14 U15 U16 U17
Figure 2.1.1 Pin assignment diagram (P-FBGA228) 4 balls of A1, A17, U1 and U17 (most outside 4 corner of BGA package) are Dummy Balls. These balls are not connected with internal LSI chip, electrical characteristics. A1 and U1, A17 and U17 are shorted in internal package. It is recommended that using to OPEN check of mounting if mounting this LSI to Target board.
Example: If checking signal (or voltage) via A1-U1-U17-A17, short U17 and U1 on Target board beforehand, and input signal (or voltage) from A1, and check voltage of A17.
92CF26A-6
2007-11-21
TMP92CF26A
Table 2.1.1 Pin number and the name
Ball No.
A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B16 B17 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 C17 D1 D2 D3 D5 D6 D7 D8
Pin name
Dummy1 PG2,AN2, MX PA6,KI6 PA5,KI5 PA3,KI3 PA1,KI1 DVCC1A5 PF1,I2S0DO PJ6,NDCLE PJ1, SDCAS , SRLUB P87, CSXB , ND1CE P83, CS3 , CSXA P81, CS1 , SDCS P72, WRLU , NDWE P70, RD P65,A21 Dummy3 VREFH PG5,AN5 PG3,AN3,MY, ADTRG PA7,KI7 PA2,KI2 PA0,KI0 PF2,I2S0WS PF0,I2S0CKO PJ5,NDALE PJ2, SDWE , SRWR PJ0, SDRAS , SRLLB P86. CSZD , ND0CE P82, CS2 , CSZA , SDCS P75,R/ W ,NDR/ B P71, WRLL , NDRE P64,A20 DVCC1A4 AVCC VREFL PG4,AN4 PG1,AN1 PA4,KI4 PC5,EA27 P76, WAIT PF5,I2S1WS PF3,I2S1CKO PJ7,SDCKE PJ3,SDLLDQM P84, CSZB P80, CS0 P67,A23 P66,A22 P63,A19 P62,A18 P97,PY AVSS PW0 PG0,AN0 PC6,EA28 PC4,EA26 P74,EA25
Ball No.
D9 D10 D11 D12 D13 D15 D16 D17 E1 E2 E3 E4 E14 E15 E16 E17 F1 F2 F3 F4 F6 F7 F8 F9 F10 F11 F14 F15 F16 F17 G1 G2 G3 G4 G6 G7 G12 G14 G15 G16 G17 H1 H2 H3 H4 H6 H12 H14 H15 H16 H17 J1 J2 J3 J4 J6 J12 J14
Pin name
P73,EA24 PF4,I2S1DO PF7,SDCLK PJ4,SDLUDQM P85, CSZC PU6,LD22 P61,A17 P60,A16 P96,PX,INT4 PW1 PW2 PW3 PU7,LD23,EO_TRGOUT PU4,LD20 P57,A15 P56,A14 DVCC1B1 PW6 PW5 PW4 DVCC3A12 DVCC3A11 DVSS11 DVCC3A10 DVSS10 DVCC3A9 PU5,LD21 PU2,LD18 P55,A13 P54,A12 DVCC3B1 PW7 PV0,SCLK0 PV1 DVSS1 DVSS12 DVSS9 PU3,LD19 PU0,LD16 P53,A11 P52,A10 PV7,SCL PV6,SDA PV3 PV2 DVCC3A1 DVCC3A8 PU1,LD17 PT7,LD15 P51,A9 P50,A8 PN2,KO2 PN1,KO1 PN0,KO0 PV4 DVSS2 DVSS8 PT6,LD14
Ball No.
J15 J16 J17 K1 K2 K3 K4 K6 K12 K14 K15 K16 K17 L1 L2 L3 L4 L6 L12 L14 L15 L16 L17 M1 M2 M3 M4 M6 M7 M8 M9 M10 M11 M12 M14 M15 M16 M17 N1 N2 N3 N4 N14 N15 N16 N17 P1 P2 P3 P5 P6 P7 P8 P9 P10 P11 P12 P13 P47,A7 P46,A6
Pin name
PT5,LD13
Ball No.
P15 P16 P17 R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15 T16 T17 U1 U2 U3 U4 U5 U6 U7 U8 U9 U10 U11 U12 U13 U14 U15 U16 U17
Pin name
PK4,LHSYNC P13,D11 P14,D12 X2 PC7,KO8 PC3,INT3,TA2IN PX5,X1USB PP7,TB1OUT0 PP1,TA3OUT PP3,INT5,TA7OUT PP5,INT7,TB1IN0 PR2, SPCS PX7 PZ0,EI_PODDATA PZ2,EI_PODREQ PZ4,EI_TRGIN PZ6,EO_MCUDATA PZ7,EO_MCUREQ P15,D13 DVCC1A3 X1 AM0 AM1 PP6,TB0OUT0 PL0,LD0 PL2,LD2 PL4,LD4 PL5,LD5 PR1,SPDO PL6,LD6 PK1,LLOAD D0 D2 D4 D6 P11,D9 P12,D10 Dummy2 RESET D+ DDVCC1A2 PL1,LD1 PL3,LD3 XT1 XT2 PL7.LD7 PK0,LCP0 D1 D3 D5 D7 P10,D8 Dummy4
PN3,KO3 PN4,KO4 PN5,KO5 PN6,KO6 DVCC3A2 DVCC3A7 PT4,LD12 PT3,LD11 P45,A5 P44,A4 PK2,LFR PN7,KO7 PM1,MLDALM,TA1OUT PM7,PWE DVSS3 DVSS7 PT2,LD10 PT1,LD9 P43,A3 P42,A2 PK3,LVSYNC PC0,INT0 PM2, ALARM , MLDALM P90,TXD0 DVCC3A3 DVSS4 DVCC3A4 DVSS5 DVCC3A5 DVSS6 DVCC3A6 PK7,LGOE2 PT0,LD8 P41,A1 P40,A0 DVCC1A1 PC1,INT1,TA0IN P91,RXD0 DVSS1C PK6,LGOE1 PK5,LGOE0 P17,D15 P16,D14 DVCC1C PC2,INT2 P92,SCLK0, CTS0 PX4,CLKOUT, LDIV PP2,TA5OUT PP4,INT6,TB0IN0 PR0,SPDI PR3,SPCLK
DBGE
PZ1,EI_SYNCLK PZ3,EI_REFCLK PZ5,EI_COMRESET
Note1: The P96, P97 and PG0~PG5 operate with the AVCC power supply. Note2: The PW0~PW7 and PV0~PV7 operate with the DVCC3B power supply. Note3: The X1 and X2 operate with the DVCC1C power supply.
92CF26A-7
2007-11-21
TMP92CF26A
2.2
Pin names and Functions
The names of the input/output pins and their functions are described below. Table 2.2.1 Pin names and functions (1/6)
Pin name
D0 to D7 P10 to P17 D8 to D15 P40 to P47 A0 to A7 P50 to P57 A8 to A15 P60 to P67 A16 to A23 P70
RD
Number of Pins
8 8 8 8 8 1 1
I/O
I/O I/O I/O Output Output Output Output I/O Output Output Output I/O Output Output Data: Data bus D0 to D7
Functions
Port 1: I/O port input or output specifiable in units of bits Data: Data bus D8 to D15 Port 4: Output port Address: Address bus A0 to A7 Port 5: Output port Address: Address bus A8 to A15 Port 6: I/O port input or output specifiable in units of bits Address: Address bus A16 to A23 Port 70: Output port Read: Outputs strobe signal to read external memory Port 71: Output port Write: Outputs strobe signal for writing data on pins D0 to D7 NAND Flash read: Outputs strobe signal to read external NAND-Flash Port 72: I/O port Write: Outputs strobe signal for writing data on pins D8 to D15 NAND Flash write: Write enable for NAND Flash Port 73: I/O port Expanded address 24 Port 74: I/O port Expanded address 25 Port 75: I/O port Read/Write: "High" represents read or dummy cycle; "Low" represents write cycle NAND Flash Ready(1) / Busy(0) input Port 76: I/O port Wait: Signal used to request CPU bus wait Port 80: Output port Chip select 0: Outputs "Low" when address is within specified address area Port 81: Output port Chip select 1: Outputs "Low" when address is within specified address area Chip select for SDRAM: Outputs "Low" when the address is within SDRAM address area Port 82: Output port Chip select 2: Outputs "Low" when address is within specified address area Expanded address ZA: Outputs "Low" when address is within specified address area Chip select for SDRAM: Outputs "Low" when the address is within SDRAM address area Port 83: Output port Chip select 3: Outputs "Low" when address is within specified address area Expanded address XA: Outputs "Low" when address is within specified address area Port 84: Output port Expanded address ZB: Outputs "Low" when address is within specified address area Port 85: Output port Expanded address ZC: Outputs "Low" when address is within specified address area
P71
WRLL NDRE
P72
WRLU NDWE
1
I/O Output Output
P73 EA24 P74 EA25 P75 R/ W NDR/ B P76
WAIT
1 1 1
I/O Output I/O Output I/O Output Input I/O Input Output Output Output Output Output
1 1 1
P80
CS0
P81
CS1 SDCS
P82
CS2 CSZA SDCS
1
Output Output Output Output
P83
CS3 CSXA
1
Output Output Output
P84
CSZB
1 1
Output Output Output Output
P85
CSZC
92CF26A-8
2007-11-21
TMP92CF26A
Table 2.2.1 Pin names and functions (2/6) Pin name
P86
CSZD ND0CE
Number of Pins
1
I/O
Output Output Output Output Port 86: Output port
Functions
Expanded address ZD: Outputs "Low" when address is within specified address area Chip select for NAND Flash 0: Outputs "Low" when NAND Flash 0 is enable Port 87: Output port Expanded address XB: Outputs "Low" when address is within specified address area Chip select for NAND Flash 1: Outputs "Low" when NAND Flash 1 is enable Port 90: I/O port Transmit data for serial 0: programmable Open-drain output Port 91: I/O port (Schmitt-input) Receive data for serial 0 Port 92: I/O port (Schmitt-input) Clock I/O for serial 0 Enable to send data for serial 0 (Clear to send) Port 96: Input port (schmitt-input, with pull-up resistor) Interrupt request pin 4: Interrupt request pin with programmable rising/falling edge X-Plus: Pin connected to X+ pin for Touch Screen I/F Port 97: Input port (schmitt input) Y-Plus: Pin connected to Y+ pin for Touch Screen I/F Port A0 to A7: Input port Key input 0 to 7: Pin used for key on wake-up 0 to 7 (Schmitt-input, with pull-up resistor) Port C0: I/O port (Schmitt-input) Interrupt request pin 0: Interrupt request pin with programmable rising/falling edge Port C1: I/O port (Schmitt-input) Interrupt request pin 1: Interrupt request pin with programmable rising/falling edge Timer A0 input: Input pin for 8 bit timer 0 Port C2: I/O port (Schmitt-input) Interrupt request pin 2: Interrupt request pin with programmable rising/falling edge Port C3: I/O port (Schmitt-input) Interrupt request pin 3: Interrupt request pin with programmable rising/falling edge Timer A2 input: Input pin for 8 bit timer 2 Port C4: I/O port Expanded address 26 Port C5: I/O port Expanded address 27 Port C6: I/O port Expanded address 28 Port C7: I/O port Key output 8: Key scan strobe pin (programmable Open-drain output)
P87
CSXB ND1CE
1
Output Output I/O Output I/O Input I/O I/O Input Input Input Output
P90 TXD0 P91 RXD0 P92 SCLK0
CTS 0
1 1
1 1
P96 INT4 PX P97 PY PA0 to PA7 KI0 to KI7 PC0 INT0 PC1 INT1 TA0IN PC2 INT2 PC3 INT3 TA2IN PC4 EA26 PC5 EA27 PC6 EA28 PC7 KO8
1
Input Output Input Input I/O Input I/O Input Input I/O Input I/O Input Input I/O Output I/O Output I/O Output I/O Output
8 1
1
1
1
1 1 1 1
92CF26A-9
2007-11-21
TMP92CF26A
Table 2.2.1 Pin names and functions (3/6) Pin name
PF0 I2S0CKO PF1 I2S0DO PF2 I2S0WS PF3 I2S0WS PF4 I2S1CKO PF5 I2S1WS PF7 SDCLK PG0 to PG1 AN0 to AN1 PG2 AN2 MX PG3 AN3 MY
ADTRG
Number of Pins
1 1 1 1 1 1 1 2
I/O
I/O Output I/O Output I/O Output I/O Output I/O Output I/O Output Output Output Input Input Input Input Output Input Input Output Input Input Input Output Output Output Output Port F0: I/O port Outputs clock for I2S0 Port F1: I/O port Outputs data for I2S0 Port F2: I/O port Outputs word select signal for I2S0 Port F3: I/O port Outputs clock for I2S1 Port F4: I/O port Outputs data for I2S1 Port F5: I/O port Outputs word select signal for I2S1 Port F7: Output port Clock for SDRAM Port G0 to G1: Input port
Functions
Analog input pin 0 to 1: Input pin for AD converter Port G2: Input port Analog input pin 2: Input pin for AD converter X-Minus: Pin connected to X- pin for Touch Screen I/F Port G3: Input port Analog input pin 3: Input pin for A/D converter Y-Minus: Pin connected to Y- pin for Touch Screen I/F A/D Trigger: Request signal for A/D start Port G4 to G5: Input port Analog input pin 4 to 5: Input pin for A/D converter Port J0: Output port Outputs strobe signal for SDRAM row address Data enable signal for D0 to D7 for SRAM Port J1: Output port Outputs strobe signal for SDRAM column address Data enable signal for D8 to D15 for SRAM Port J2: Output port Outputs write enable signal for SDRAM Write enable for SRAM: Outputs strobe signal to write data Port J3: Output port Data enable signal for D0 to D7 for SDRAM Port J4: Output port Data enable signal for D8 to D15 for SDRAM Port J5: I/O port Address latch enable signal for NAND Flash Port J6: I/O port Command latch enable signal for NAND Flash Port J7: Output port Clock enable signal for SDRAM
1
1
PG4 to PG5 AN4 to AN5 PJ0
SDRAS SRLLB
2
1
PJ1
SDCAS SRLUB
1
Output Output Output
PJ2
SDWE SRWR
1
Output Output Output Output Output Output I/O Output I/O Output Output Output
PJ3 SDLLDQM PJ4 SDLUDQM PJ5 NDALE PJ6 NDCLE PJ7 SDCKE
1 1 1 1 1
92CF26A-10
2007-11-21
TMP92CF26A
Table 2.2.1 Pin names and functions (4/6) Pin name
PK0 LCP0 PK1 LLOAD PK2 LFR PK3 LVSYNC PK4 LHSYNC PK5 LGOE0 PK6 LGOE1 PK7 LGOE2 PL0 to PL7 LD0 to LD7 PM1 TA1OUT MLDALM PM2
ALARM
MLDALM
Number of Pins
1 1 1 1 1 1 1 1 8
I/O
Output Output Output Output Output Output Output Output Output Input Output Output Output Output Output Output Output Output Output Output Output Output Port K0: Output port Signal for LCD driver Port K1: Output port Signal for LCD driver: Data load signal Port K2: Output port Signal for LCD driver Port K3: Output port
Functions
Signal for LCD driver: Vertical sync signal Port K4: Output port Signal for LCD driver: Horizontal sync signal Port K5: Output port Signal for LCD driver Port K6: Output port Signal for LCD driver Port K7: Output port Signal for LCD driver Port L0 to L7: Output port Data bus for LCD driver: LD0 to LD7 Port M1: Output port Timer A1 output: Output pin for 8 bit timer 1 Melody / Alarm output pin Port M2: Output port Alarm output from RTC Melody / Alarm output pin (inverted) Port M7: Output port External power supply control output: Pin to control ON/OFF for external power supply. In stand-by mode, outputs "L" level In other than stand-by mode, outputs "H" level Port N: I/O port Key output 0 to 7: Key scan strobe pin (programmable Open-drain output) Port P1: I/O port Timer A3 output: Output pin for 8 bit timer 3 Port P2: I/O port Timer A5 output: Output pin for 8 bit timer 5 Port P3: I/O port (Schmitt-input) Interrupt request pin 5: Interrupt request pin with programmable rising/falling edge Timer A7 output: Output pin for 8 bit timer 7 Port P4: I/O port (Schmitt-input) Interrupt request pin 6: Interrupt request pin with programmable rising/falling edge Timer B0 input: Input pin for 16 bit timer 0 Port P5: I/O port (Schmitt-input) Interrupt request pin 7: Interrupt request pin with programmable rising/falling edge Timer B1 input: Input pin for 16 bit timer 1 Port P6: I/O port Timer B0 output: Output pin for 16 bit timer 0 Port P7: I/O port Timer B1 output: Output pin for 16 bit timer 1 Port R0: I/O port Data input pin for SD card Port R1: I/O port Data output pin for SD card Port R2: I/O port Chip select signal for SD card
1
1
Output Output Output
PM7 PWE PN0 to PN7 KO0 to KO7 PP1 TA3OUT PP2 TA5OUT PP3 INT5 TA7OUT PP4 INT6 TB0IN0 PP5 INT7 TB1IN0 PP6 TB0OUT0 PP7 TB1OUT0 PR0 SPDI PR1 SPDO PR2
SPCS
1
Output I/O Output I/O Output I/O Output I/O Input Output I/O
8 1 1
1
1
Input Input I/O
1
Input Input Output Output Output Output I/O Input I/O Output I/O Output
1 1 1 1 1
92CF26A-11
2007-11-21
TMP92CF26A
Table 2.2.1 Pin names and functions (5/6) Pin name
PR3 SPCLK PT0 to PT7 LD8 to LD15 PU0 to PU4,PU6
LD16 to LD20,LD22
Number of Pins
1 8 6 1
I/O
I/O Output I/O Output I/O Output I/O Output I/O Output Output I/O Output I/O I/O Output I/O I/O I/O I/O I/O Output Output Output I/O Input I/O I/O Input I/O Input I/O Input I/O Input I/O Input I/O Input I/O Output I/O Output Port R3: I/O port Clock output pin for SD card Port T0 to T7: I/O port Data bus for LCD driver: LD8 to LD15 Port U0 to U4 , U6: I/O port
Functions
Data bus for LCD driver: LD16 to LD20, LD22 Port U5: I/O port Data bus for LCD driver: LD21 Port U7: I/O port Data bus for LCD driver: LD23 Output pin for Debug mode Port V0: I/O port Clock I/O for serial 0 Port V1: I/O port Port V2: I/O port Port V3 to V4: Output port Port V6: I/O port Send/receive data at I C mode Port V7: I/O port Input/output clock at I C mode Port W0 to W7: I/O port Port X4: Output port Internal clock output pin Output pin for LCD driver Port X5: I/O port Clock input pin for USB Port X7: I/O port Port Z0: I/O port (Schmitt-input) Input pin for Debug mode Port Z1: I/O port (Schmitt-input) Input pin for Debug mode Port Z2: I/O port (Schmitt-input) Input pin for Debug mode Port Z3: I/O port (Schmitt-input) Input pin for Debug mode Port Z4: I/O port (Schmitt-input) Input pin for Debug mode Port Z5: I/O port (Schmitt-input) Input pin for Debug mode Port Z6: I/O port (Schmitt-input) Output pin for Debug mode Port Z7: I/O port (Schmitt-input) Output pin for Debug mode
2 2
PU5 LD21 PU7 LD23 EO_TRGOUT PV0 SCLK0 PV1 PV2 PV3 to PV4 PV6 SDA PV7 SCL PW0 to PW7 PX4 CLKOUT LDIV PX5 X1USB PX7 PZ0 EI_PODDATA PZ1 EI_SYNCLK PZ2 EI_PODREQ PZ3 EI_REFCLK PZ4 EI_TRGIN PZ5 EI_COMRESET PZ6 EO_MCUDATA PZ7 EO_MCUREQ
1
1 1 1 2 1 1 8 1
1 1 1 1 1 1 1 1 1 1
92CF26A-12
2007-11-21
TMP92CF26A
Table 2.2.1 Pin names and functions (6/6) Pin name Number of Pins
2 1
I/O
USB-data connecting pin
Functions
D+, D- CLKOUT
I/O Output
Connect pull-up(DVCC3A) or pull-down resistor to both pins to avoid through current when USB is not in use. Internal clock output pin Operation mode; Fix to AM1 = "0",AM0 = "1" for 16 bit external bus starting
AM1,AM0
2
Input
Fix to AM1 = "1",AM0 = "0" is prohibit to set Fix to AM1 = "1",AM0 = "1" for BOOT (32 bit internal Mask ROM) starting Fix to AM1 = "0",AM0 = "0" is prohibited to set
DBGE X1/X2 XT1/XT2 RESET VREFH VREFL AVCC AVSS DVCC3A DVCC3B DVCC1A DVCC1B DVSSCOM DVCC1C DVSS1C Dummy4-1
1 2 2 1 1 1 1 1 12 1 5 1 12 1 1 4
Input I/O I/O Input Input Input
- - - - - - - - - -
Input pin in debug mode (This pin is set to "Debug mode" by input "0" ) High-frequency oscillator circuit connection pin Low-frequency oscillator circuit connection pin Reset: Initialize TMP92CF26A (Schmitt-input , with pull-up resistor) Pin for reference voltage input to AD converter(H) Pin for reference voltage input to AD converter(L) Power supply pin for AD converter GND pin for AD converter (0V) Power supply pin for peripheral I/O-A (All DVCC3A pins should be connected to the power supply pin ) Power supply pin for peripheral I/O-B (All DVCC3B pins should be connected to the power supply pin ) Power supply pin for internal logic-A (All DVCC1A pins should be connected to the power supply pin ) Power supply pin for internal logic-B (Keep the voltage DVCC1A level ) GND pin (0V) (All DVSS pins should be connected to GND(0V) ) Power supply pin for High speed oscillator (Keep the voltage DVCC1A level ) GND pin (0V) (DVSS1C pin should be connected to GND(0V) ) Dummy1 and Dummy2, Dummy3 and Dummy4 are shorted in package (These pins are not connected with internal LSI chip )
Table 2.2.2 shows the range of operational voltage for power supply pins.
Table 2.2.2 the range of operational voltage for power supply pins Power supply pin
DVCC1A DVCC1B DVCC1C DVCC3A DVCC3B AVCC 3.0V~3.6V 1.4V~1.6V
Range of operational voltage
92CF26A-13
2007-11-21
TMP92CF26A
3.
Operation
This section describes the basic components, functions and operation of the TMP92CF26A.
3.1
CPU
The TMP92CF26A contains an advanced high-speed 32-bit CPU (TLCS-900/H1 CPU)
3.1.1
CPU Outline
The TLCS-900/H1 CPU is a high-speed, high-performance CPU based on the TLCS-900/L1 CPU. The TLCS-900/H1 CPU has an expanded 32-bit internal data bus to process Instructions more quickly. The following is an outline of the CPU: Table 3.1.1Outline of TMP92CF26A Parameter
Width of CPU Address Bus Width of CPU Data Bus Internal Operating Frequency Minimum Bus Cycle Internal RAM Internal Boot ROM Internal I/O
TMP92CF26A
24-bit 32-bit Max 80MHz 1-clock access (12.5ns at 80MHz) 32-bit 2-1-1-1 clock access 32 bit 2-clock access 8-bit, INTC,SDRAMC, 2-clock access MEMC,LCDC, TSI,PORT,PMC 16-bit, 2-clock access 32-bit, 2-clock access 32-bit, 1-clock access 8-bit, 5 to 6-clock access MMU,USB, NDFC,SPIC,DMAC IS MAC
2
External memory (SRAM, MASKROM etc.) External memory (SDRAM) External memory (NAND FLASH) Minimum Instruction Execution Cycle Conditional Jump Instruction Queue Buffer Instruction Set CPU mode Micro DMA Hardware DMA
TMRA,TMRB, SIO,RTC, MLD/ALM, SBI CGEAR,ADC,WDT 8/16-bit 2-clock access (waits can be inserted) 16-bit 1-clock access 8/16-bit 2-clock access (waits can be inserted)
1-clock (12.5ns at 80MHz) 2-clock (25.0ns at 80MHz) 12-byte Compatible with TLCS-900/L1 (LDX instruction is deleted) Maximum mode only 8-channel 6-channel
92CF26A-14
2007-11-21
TMP92CF26A 3.1.2 Reset Operation
When resetting the TMP92CF26A microcontroller, ensure that the power supply voltage is within the operating voltage range, and that the internal high-frequency oscillator has stabilized. Then hold the RESET input Low for at least 20 system clocks (32s at X1=10MHz). At reset, since the clock doublers (PLL0) is bypassed and the clock-gear is set to 1/16, the system clock operates at 625 kHz(X1=10MHz). When the Reset has been accepted, the CPU performs the following. CPU internal registers do not change when the Reset is released. * Sets the Stack Pointer (XSP) to 00000000H. * Sets bits of the Status Register (SR) to "111" (thereby setting the Interrupt Level Mask Register to level 7). * Clears bits of the Status Register to "00" (thereby selecting Register Bank 0). When the Reset is released, the CPU starts executing instructions according to the Program Counter settings. * Sets the Program Counter (PC) as follows in accordance with the Reset Vector stored at address FFFF00H~FFFF02H: PC<7:0> PC<15:8> PC<23:16> data in location FFFF00H data in location FFFF01H data in location FFFF02H
When the Reset is accepted, the CPU sets internal I/O, ports and other pins as follows. * Initializes the internal I/O registers as table of "Special Function Register" in Section 5.
Note1: This LSI builds in RAM internally. However, the data in internal RAM may not be held by Reset operation. After reset, initialize the data in internal RAM. Note2: This LSI builds in PMC function (for reducing stand-by current by blocking the power supply of DVCC1A and DVCC1C). However, if executing reset operation without supplying DVCC1A and DVCC1C, the current may flow to internal. When reset this LSI, supply the power of DVCC1A and DVCC1C first and wait until the power supply stabilizes.
Figure 3.1.1 shows reset timing chart. Figure 3.1.2 shows the example of order of supplying power and the timing of releasing reset.
92CF26A-15
2007-11-21
fSYS Sampling Sampling
RESET
fSYSx(15.516.5) Clock
0FFFF00H
A23A0
CS0,1, 3
CS2
D0D15
DATA-IN
DATA-IN Read
Figure 3.1.1 TMP92CF26A Reset timing chart
92CF26A-16
RD
SRxxB (After reset is released, it is started from 1 wait read cycle)
D0D15
DATA-OUT
Write
WRxx
SRWR
SRxxB
TMP92CF26A
2007-11-21
: High-Z
TMP92CF26A
This LSI has the restriction for the order of supplying power. Be sure to supply external 3.3V power with 1.5V power is supplied.
When Powering on Power Cut Mode (PMC) When Powering off
DVCC1A 1.5V Power DVCC1B DVCC1C
1.5-V rails should be turned on first, followed by the 3.3-V rails. Power should rise and stabilizes within 100 ms. Power should fall and stabilizes within 100 ms. 3.3-V rails should be turned off first, followed by the 1.5-V rails.
3.3V Power
DVCC3A
DVCC3B
AVCC
High-frequency Oscillation Stabilizing Time 20 system clock cycles
RESET
PWE terminal
Note1: Although it is possible to turn on or off the 1.5-V and 3.3-V power supply rails simultaneously, it may cause external pins to temporarily become unstable. Therefore, if there is any possibility that this would affect peripheral devices connected with the TMP92CF26A, external power supplies should be turned on or off while the internal power supplies are stable, as indicated by the heavy lines in the diagram above. Note2: In the power-on sequence, the 3.3-V power supply rails must not be turned on before the ones of 1.5-V . In the power -off sequence, the 3.3-V power supply rails must not be turned off after the ones of 1.5-V.
Figure 3.1.2 Power on Reset Timing Example
92CF26A-17
2007-11-21
TMP92CF26A 3.1.3 Setting of AM0 and AM1
Set AM1 and AM0 pins as shown in Table 3.1.2 according to system usage. Table 3.1.2 Operation Mode Setup Table Mode Setup input pin
RESET
AM1
0 1
AM0
1 0
Operation Mode
DBGE
0 1 0 1 0 1 0 1 Debug mode 16-bit external bus starting Test mode (Prohibit to set) Test mode (Prohibit to set) BOOT(32-bit internal-MROM ) starting (BOOT mode) Test mode (Prohibit to set)
1
1
0
0
92CF26A-18
2007-11-21
TMP92CF26A
3.2
Memory Map
Figure 3.2.1 is a memory map of the TMP92CF26A.
000000H
Internal I/O (8 Kbyte)
Direct area(n) 64Kbyte area (nn)
000100H 001FF0H 002000H 010000H 021FFFH Don't access area 046000H
(Internal Back Up RAM 16kbyte)
Internal RAM (128 Kbyte)
04A000H
External memory
16Mbyte area (R) F00000H F10000H External memory
Provisional Emulator Control Area (64kbyte)
(-R) (Note1) (R+) (R + R8/16)
(R + d8/16)
(nnn)
FFFF00H FFFFFFH
Vector table (256 Byte)
(Note2) (
=
Internal area )
Figure 3.2.1 Memory Map
Note1: The Provisional emulator control area, mapped F00000H to F0FFFFH after reset, is for a Debug mode use and so is not available Note2: Do not use the last 16-byte area (FFFFF0H to FFFFFFH). This area is reserved as internal area.
92CF26A-19
2007-11-21
TMP92CF26A
3.3
Clock Function and Standby Function
The TMP92CF26A contains (1) clock gear, (2) clock doubler (PLL), (3) standby controller and (4) noise reduction circuits. They are used for low-power, low-noise systems. This chapter is organized as follows: 3.3.1 Block diagram of system clock 3.3.2 SFRs 3.3.3 System clock controller 3.3.4 Prescaler clock controller 3.3.5 Noise reduction circuits 3.3.7 Standby controller
92CF26A-20
2007-11-21
TMP92CF26A
The clock operating modes are as follows: (a) PLL-OFF Mode (X1, X2 pins only), (b) PLL-ON Mode (X1, X2, and PLL). Figure 3.3.1 shows a transition figure.
Reset (fOSCH/16) IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator) instruction interrupt instruction interrupt (a) release Reset
PLL-OFF mode (fOSCH/gear value)
instruction interrupt
STOP mode (Stops all circuits)
PLL-OFF mode transition figure Reset (fOSCH/16)
IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator) IDLE2 mode (I/O operate) IDLE1 mode (Operate only oscillator)
instruction interrupt instruction interrupt instruction interrupt instruction interrupt (b)
release Reset instruction PLL-OFF mode interrupt /gear value) (f
OSCH
STOP mode (Stops all circuits)
Instruction (Note) PLL-ON mode
((12 or 16)xfOSCH/gear value)
PLL-OFF , PLL-ON mode transition figure
Note 1: When shifting from PLL-ON mode to PLL-OFF mode, execute the following setting in the same order. (1) Change CPU clock (Set "0" to PLLCR0) (2) Stop PLL circuit (Set "0" to PLLCR1) Note 2: It is not possible to shift from PLL-ON mode to STOP mode directly. PLL-OFF mode should be set once before shifting to STOP mode.
Figure 3.3.1 System clock block diagram
The clock frequency input from the X1 and X2 pins is called fOSCH and the clock frequency input from the XT1 and XT2 pins is called fs. The clock frequency selected by SYSCR1 is called the system clock fSYS. And one cycle of fSYS is defined to as one state.
92CF26A-21
2007-11-21
TMP92CF26A 3.3.1 Block diagram of system clock
SYSCR0 SYSCR2 Warming up timer (High/Low frequency oscillator circuit) /2 Lock up timer (PLL) SYSCR0 XT1 XT2 Low frequency Oscillator circuit fs PLLCR1, PLLCR0 fc fc/2 fc/4 Clock Doubler0 (PLL0) x (12 or16) fSYS
fc/16 /2 /2 /4 /8 /16
/4
T0 T0TMR /2
/8
SYSCR0 fs
fPLL
fc/8 /2
fIO
X1 X2
High frequency Oscillator circuit fOSCH
SYSCR1
Clock gear PLLCR0 SYSCR0
/5
Clock Doubler1 (PLL1)x 24 X1USB
fPLLUSB
fUSB
fSYS fio T0TMR TMRA0:7,TMRB0:1
Prescaler
CPU RAM Interrupt Controller SIO0
LCDC Memory Controller NAND-Flash Controller IS TSI SPIC
2
T0
I/O ports
Prescaler
fPLL
SDRAMC SBI
Prescaler
DMAC MAC
RTC fs MLD/ALM
ADC
WDT fUSB USB
Figure 3.3.2 Block Diagram of System clock
92CF26A-22
2007-11-21
TMP92CF26A
TMP92CF26A has two PLL circuits: one is for CPU (PLL0) and the other for USB (PLL1). Each PLL can be controlled independently. Frequency of external oscillator is 6 to 10MHz. Don't connect oscillator more than 10MHz. When clock is input by using external oscillator, range of input frequency is 6 to 10MHz. Don't input the clock over 10MHz. Table 3.3.1 Setting example for fOSCH High frequency: fOSCH
(a) USB in use, with PLL (PLL0 ON/PLL1 ON) (b) USB not in use, with PLL (PLL0 ON/PLL1 OFF) (c) USB not in use, without PLL (PLL0 OFF/PLL1 OFF) 10.0 MHz Max 10.0 MHz Max 10.0 MHz
System clock: fSYS
Max 80 MHz Max 80 MHz Max 10 MHz
System clock: fSYS
Max 60 MHz Max 60 MHz Max 10 MHz
USB clock: fUSB
48 MHz
- -
Note: When using USB, the high-frequency oscillator should be 10.0 MHz.
92CF26A-23
2007-11-21
TMP92CF26A 3.3.2 SFR
7
SYSCR0 (10E0H) bit Symbol Read/write Reset State Function
6
XTEN 1 Low -frequency oscillator circuit (fs)
5
USBCLK1 R/W 0
4
USBCLK0 0
3
2
WUEF R/W 0 Warm-up Timer
0: Write Don't care Note3 1: Write start timer 0: Read end warm-up 1: Read do not end warm-up
1
0
PRCK R/W 0 Select Prescaler clock 0: fSYS/2 1: fSYS/8
Select the clock of USB(fUSB) 00:Disable 01: Reserved 10: X1USB 0: Stop 1: Oscillation 11: fPLLUSB
7
SYSCR1 (10E1H) bit Symbol Read/write Reset State Function
6
5
4
3
2
GEAR2 1
1
GEAR1 R/W 0
0
GEAR0 0
Select gear value of high frequency (fc) 000: fc 001: fc/2 010: fc/4 011: fc/8 100: fc/16 101: Reserved 110: Reserved 111: Reserved
7
SYSCR2 (10E2H) bit Symbol Read/write Reset State Function - 0 Always write "0"
6
CKOSEL 0
Select CLKOUT 0: fSYS 1: fS
5
4
3
HALTM1 1 HALT mode 00: Reserved 01: STOP mode 10: IDLE1 mode 11: IDLE2 mode
2
HALTM0 1
1
0
WUPTM1 WUPTM0 R/W 1 0
Warm-Up Timer 00: Reserved 01: 28/inputted frequency 10:214/inputted frequency 11:216/inputted frequency
Note1: The unassigned registers, SYSCR0,SYSCR1 and SYSCR2 are read as undefined value. Note2: Low frequency oscillator circuit is enabled on reset. Note3: Do not write SYSCR0 resiter during warming up. Because the warm-up end flag doesn't become enable if write "0" to SYSCR0 bit during warming up. (A read-modify-write operation cannot be performed for SYSCR0 register during warming up.)
Figure 3.3.3 SFR for system clock
92CF26A-24
2007-11-21
TMP92CF26A
7
EMCCR0 Bit symbol (10E3H) Read/Write Reset State Function PROTECT R 0 Protect flag 0: OFF 1: ON
6
5
4
3
-
2
EXTIN 0
1: External clock
1
0
0 Always write "0".
DRVOSCH DRVOSCL R/W 1 1 fc oscillator fs oscillator drive ability drive ability
1: NORMAL 0: WEAK 1: NORMAL 0: WEAK
EMCCR1 Bit symbol (10E4H) Read/Write Reset State Function EMCCR2 Bit symbol (10E5H) Read/Write Reset State Function
Switch the protect ON/OFF by writing the following to 1 -KEY,2 -KEY st 1 -KEY: write in sequence EMCCR1=5AH,EMCCR2=A5H nd 2 -KEY: write in sequence EMCCR1=A5H,EMCCR2=5AH
st
nd
Note: In case restarting the oscillator in the stop oscillation state (e.g. Restart the oscillator in STOP mode), set EMCCR0, = "1".
Figure 3.3.4 SFR for system clock
92CF26A-25
2007-11-21
TMP92CF26A
7
PLLCR0 (10E8H) bit symbol Read/Write Reset State Function
6
FCSEL R/W 0 Select fc-clock 0 : fOSCH 1 : fPLL
5
LUPFG R 0 Lock-up timer Status flag 0 : not end 1 : end
4
3
2
1
0
Note: Ensure that the logic of PLLCR0 is different from 900/L1's DFM.
7
PLLCR1 (10E9H) bit symbol Read/Write Reset State Function PLL0 0 PLL0 for CPU 0: Off 1: On
6
PLL1 R/W 0 PLL1 for USB 0: Off 1: On
5
LUPSEL 0 Select stage of Lock up counter
0: 12 stage (for PLL0) 1:13 stage (for PLL1)
4
3
2
1
0
PLLTIMES R/W 0 Select the number of PLL 0: x12 1: x16
Figure 3.3.5 SFR for PLL
7
PxDR (xxxxH) bit symbol Read/Write System Reset State Hot Reset State Function Px7D
6
Px6D
5
Px5D
4
Px4D R/W
3
Px3D
2
Px2D
1
Px1D
0
Px0D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Output/Input buffer drive-register for standby-mode
(Purpose and using) * * * * * * This register is used to set each pin-status at stand-by mode. All ports have registers of the format shown above. ("x" indicates the port name.) For each register, refer to 3.5 Function of Ports. Before "HALT" instruction is executed, set each register pin-status. They will be effective after the CPU has executes the "HALT" instruction. This is the case regardless of stand-by modes (IDLE2, IDLE1 or STOP). This is the case regardless of using PMC function. For details, refer to PMC section. The Output/Input buffer control table is shown below. OE
0 0 1 1
PxnD
0 1 0 1
Output buffer
OFF OFF OFF ON
Input buffer
OFF ON OFF OFF
Note1: OE denotes an output enable signal before stand-by mode. Basically, PxCR is used as OE. Note2: "n" in PxnD denotes the bit number of PORTx.
Figure 3.3.6 SFR for Drive register
92CF26A-26
2007-11-21
TMP92CF26A 3.3.3 System clock controller
The system clock controller generates the system clock signal (fSYS) for the CPU core and internal I/O. SYSCR0 and SYSCR0 control enabling and disabling of each oscillator. SYSCR1 sets the high frequency clock gear to either 1, 2, 4, 8 or 16 (fc, fc/2, fc/4, fc/8, fc/16). These functions can reduce the power consumption of the equipment in which the device is installed. The combination of settings = "1", = "0" and = "100" will be PLL-OFF mode and cause the system clock (fSYS) to be set to fc/16 after reset. For example, fSYS is set to 625 kHz when the 10MHz oscillator is connected to the X1 and X2 pins. (1) Clock gear controller fSYS is set according to the contents of the Clock Gear Select Register SYSCR1 to either fc, fc/2, fc/4, fc/8 or fc/16. Using the clock gear to select a lower value of fSYS reduces power consumption. (Example) Changing clock gear
SYSCR1 EQU LD LD X: don't care 10E1H (SYSCR1),XXXXX001B (DUMMY),00H ; Changes system clock fSYS to fc/2 Dummy instruction
(High-speed clock gear changing) To change the clock gear, write the register value to the SYSCR1 register. It is necessary for the warming up time to elapse before the change occurs after writing the register value. There is the possibility that the instruction following the clock gear changing instruction is executed by the clock gear before changing. To execute the instruction following the clock gear switching instruction by the clock gear after changing, input the dummy instruction as follows (instruction to execute the write cycle).
(Example) SYSCR1 EQU LD LD 10E1H (SYSCR1),XXXXX010B (DUMMY),00H ; ; Changes fSYS to fc/4 Dummy instruction
Instruction to be executed after clock gear changed
92CF26A-27
2007-11-21
TMP92CF26A 3.3.4 Clock doubler (PLL)
PLL0 outputs the fPLL clock signal, which is 12 or 16 times as fast as fOSCH. A low-speed frequency oscillator can be used as external oscillator, even though the internal clock is high-frequency. Since Reset initializes PLL0 to stop status, so setting to PLLCR0 and PLLCR1-register is needed before use. As with an oscillator, this circuit requires time to stabilize. This is called the lock-up time and it is measured by a 12-stage binary counter. Lock-up time is about 0.41ms at fOSCH = 10MHz. PLL (PLL1) which is special for USB is built in. Lock-up time is about 0.82ms at fOSCH = 10MHz measured by 13-stage binary counter.
Note1: Input frequency range for PLL The input frequency range (High frequency oscillation) for PLL is as follows: fOSCH = X to X MHz (Vcc = 1.4 to 1.6V) Note2: PLLCR0 The logic of PLLCR0 is different from 900/L1's DFM. Exercise care in determining theend of lock-up time. Note3: PLLCR1, PLLCR1 It is not possible to turn ON both PLL0 and PLL1 simultaneously. If turning ON simultaneously, one PLL should be turn ON after finishing the lock up of the other PLL.
Table 3.3.2 shows the frequency of fSYS when using PLL and clock gear at fOSCH =10MHz. Table 3.3.2 The frequency of fSYS at fOSCH =10MHz fOSCH
10MHz
fPLL
fOSCH 10MHz
x12 120MHz x16 160MHz
Frequency of fSYS fc
10MHz 60MHz 80MHz
fc/2
5MHz 30MHz 40MHz
fc/4
2.5MHz 15MHz 20MHz
fc/8
1.25MHz 7.5MHz 10MHz
fc/16
625KHz 3.75MHz 5MHz
92CF26A-28
2007-11-21
TMP92CF26A
The following is an example of settings for PLL0-starting and PLL0 stopping. (Example-1) PLL0-starting
PLLCR0 PLLCR1 LUP: EQU EQU LD BIT JR LD X: Don't care
PLL output: fPLL Lockup timer System clock fSYS Starts PLL0 operation and Starts lock-up. Changes from 10MHz to 60MHz. Ends of lock-up
Counts up by fOSCH
10E8H 10E9H (PLLCR1),1XXXXXXXXB 5,(PLLCR0) Z,LUP (PLLCR0), X1XXXXXXB ; ; ; ; Enables PLL0 operation and starts lock up. Detects end of lock-up Changes fc from 10 MHz to 60 MHz.
During lock-up
After lock-up
(Example-2) PLL0-stopping
PLLCR0 PLLCR1 EQU EQU LD LD X: Don't care
PLL0 output: fPLL System clock fSYS Changes from 60MHz to 10 MHz. Stops PLL0 operation .
10E8H 10E9H (PLLCR0),X0XXXXXXB (PLLCR1),0XXXXXXXB ; ; Changes fc from 60 MHz to10 MHz. Stop PLL
Note: PLL1 operates as well.
92CF26A-29
2007-11-21
TMP92CF26A
Limitations on the use of PLL0 1. When stopping PLL operation during PLL0 use, execute the following settings in the same order.
LD LD X: Don't care (PLLCR0),X0XXXXXXB (PLLCR1),0XXXXXXXB ; ; Change the clock fPLL to fOSCH Stop PLL0
2. When shifting to STOP mode during PLL use, execute the following settings in the same order.
LD LD LD HALT X: Don't care (SYSCR2),XXXX01XXB (PLLCR0), X0XXXXXXB (PLLCR1), 0XXXXXXXB ; ; ; ; Set the STOP mode Change the system clock fPLL to fOSCH Stop PLL0 Shift to STOP mode
Examples of settings are shown below: (1) Start Up / Change Control (OK) High frequency oscillator operation mode(fOSCH )PLL0 start up PLL0 use mode (fPLL )
LD LUP: BIT JR LD X: Don't care (PLLCR1), 1XXXXXXXB 5,(PLLCR0) Z,LUP (PLLCR0), X1XXXXXXB ; ; ; ; Check for lock up end flag Change the system clock fOSCH to fPLL PLL0 start up / lock up start
(2) Change / Stop Control (OK) PLL0 use mode (fPLL ) High frequency oscillator operation mode(fOSCH ) PLL0 Stop
LD LD X: Don't care (PLLCR0),X0XXXXXXB (PLLCR1),0XXXXXXXB ; ; Change the system clock fPLL to fOSCH Stop PLL0
(OK) PLL0 use mode (fPLL ) Set the STOP mode High frequency oscillator operation mode (fOSCH) PLL stop HALT(High frequency oscillator stop)
LD LD LD HALT X: Don't care (SYSCR2),XXXX01XXB (PLLCR0),X0XXXXXXB (PLLCR1),0XXXXXXXB ; ; ; ; Set the STOP mode (This command can be executed before use of PLL0) Change the system clock fPLL to fOSCH Stop PLL0 Shift to STOP mode
(NG) PLL0 use mode (fPLL) Set the STOP mode HALT(High frequency oscillator stop)
LD HALT X: Don't care (SYSCR2),XXXX01XXB ; ; Set the STOP mode (This command can be executed before use of PLL0) Shift to STOP mode
92CF26A-30
2007-11-21
TMP92CF26A 3.3.5 Noise reduction circuits
Noise reduction circuits are built in, allowing implementation of the following features. (1) Reduced drivability for high-frequency oscillator circuit (2) Reduced drivability for low-frequency oscillator circuit (3) Single drive for high-frequency oscillator circuit (4) Runaway prevention using SFR protection register These are set in EMCCR0 to EMCCR2 registers.
(1) Reduced drivability for high-frequency oscillator circuit (Purpose) Reduces noise and power for oscillator when a resonator is used. (Clock diagram)
fOSCH C1 Resonator X1 pin Enable oscillation EMCCR0
C2 X2 pin
(Setting method) The drivability of the oscillator is reduced by writing"0" to EMCCR0 register. At reset, is initialized to "1" and the oscillator starts oscillation by normal-drivability when the power-supply is on.
Note: This function (EMCCR0= "0") is available when fOSCH = 6 to 10MHz.
92CF26A-31
2007-11-21
TMP92CF26A
(2) Reduced drivability for low-frequency oscillator circuit (Purpose) Reduces noise and power for oscillator when a resonator is used. (Block diagram)
C1 Resonator EMCCR0 C2 XT2 pin fS XT1 pin Enable oscillation
(Setting method) The drivability of the oscillator is reduced by writing 0 to the EMCCR0 register. At Reset, is initialized to "1". (3) Single drive for high-frequency oscillator circuit (Purpose) Remove the need for twin-drives and protect prevent operational errors caused by noise input to X2 pin when an external-oscillator is used. (Block diagram)
fOSCH X1 pin Enable oscillation EMCCR0
X2 pin
(Setting method) The oscillator is disabled and starts operation as buffer by writing "1" to EMCCR0 register. X2 pin's output is always "1". At reset, is initialized to "0".
Note: Do not write EMCCR0 = "1" when using external resonator.
92CF26A-32
2007-11-21
TMP92CF26A
(4) Runaway prevention using SFR protection register (Purpose) Prevention of program runaway caused by introduction of noise. Write operations to a specified SFR are prohibited so that the program is protected from runaway caused by stopping of the clock or by changes to the memory control register (Memory controller, MMU) which prevent fetch operations.. Runaway error handling is also facilitated by INTP0 interruption. Specified SFR list 1. Memory controller B0CSL/H, B1CSL/H, B2CSL/H, B3CSL/H, BECSL/H MSAR0, MSAR1, MSAR2, MSAR3, MAMR0, MAMR1, MAMR2, MAMR3, PMEMCR, MEMCR0, CSTMGCR, WRTMGCR, RDTMGCR0 RDTMGCR1, BROMCR 2. MMU LOCALPX/PY/PZ, LOCALLX/LY/LZ, LOCALRX/RY/RZ, LOCALWX/WY/WZ, LOCALESX/ESY/ESZ, LOCALEDX/EDY/EDZ, LOCALOSX/OSY/OSZ, LOCALODX/ODY/ODZ 3. Clock gear SYSCR0, SYSCR1, SYSCR2, EMCCR0 4. PLL PLLCR0,PLLCR1 5. PMC PMCCTL
(Operation explanation) Execute and release of protection (write operation to specified SFR) becomes possible by setting up a double key to EMCCR1 and EMCCR2 registers. (Double key) 1st-KEY: writes in sequence, 5AH at EMCCR1 and A5H at EMCCR2 2nd-KEY: writes in sequence, A5H at EMCCR1 and 5AH at EMCCR2 Protection state can be confirmed by reading EMCCR0. At reset, protection becomes OFF. INTP0 interruption also occurs when a write operation to the specified SFR is executed with protection in the ON state.
92CF26A-33
2007-11-21
TMP92CF26A 3.3.6 Standby controller
(1) HALT Modes and Port Drive-register When the HALT instruction is executed, the operating mode switches to IDLE2, IDLE1 or STOP Mode, depending on the contents of the SYSCR2 register and each pin-status is set according to the PxDR register, as shown below. 7
PxDR bit symbol (xxxxH) Read/Write System Reset State Hot Reset State Function Px7D
6
Px6D
5
Px5D
4
Px4D R/W
3
Px3D
2
Px2D
1
Px1D
0
Px0D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Output/Input buffer drive-register for standby-mode
(Purpose and using) * * * * This register is used to set each pin-status at stand-by mode. All ports have this registers of the format shown above ("x" indicates the port-name.) For each register, refer to 3.5 Function of Ports. Before "HALT" instruction is executed, set each register pin-status. They will be effective after the CPU has executed the "HALT" instruction. * This is the case regardless of stand-by mode (IDLE2, IDLE1 or STOP). * This is the case regardless of using PMC function. For details, refer to PMC section. The Output/Input-buffer control table is shown below. OE
0 0 1 1
PxnD
0 1 0 1
Output buffer
OFF OFF OFF ON
Input buffer
OFF ON OFF OFF
Note1: OE denotes an output enable signal before stand-by mode. Basically, PxCR is used as OE. Note2: "n" in PxnD denotes the bit number of PORTx.
The subsequent actions performed in each mode are as follows: a. IDLE2: Only the CPU halts. The internal I/O is available to select operation during IDLE2 mode by setting the following register. Table 3.3.3 shows the registers setting operation during IDLE2 mode. Table 3.3.3 SFR setting operation during IDLE2 mode Internal I/O
TMRA01 TMRA23 TMRA45 TMRA67 TMRB0 TMRB1 SIO0 SBI A/D converter WDT
SFR
TA01RUN TA23RUN TA45RUN TA67RUN TB0RUN TB1RUN SC0MOD1 SBIBR0 ADMOD1 WDMOD
b. IDLE1: Only the oscillator, RTC (real-time clock), and MLD continue to operate. c. STOP: All internal circuits stop operating.
92CF26A-34
2007-11-21
TMP92CF26A
The operation of each of the different Halt Modes is described in Table 3.3.4. Table 3.3.4 I/O operation during Halt Modes HALT Mode SYSCR2
CPU, MAC I/O ports TMRA, TMRB SIO,SBI A/D converter WDT I2S, LCDC, SDRAMC, Interrupt controller, SPIC, DMAC, NDFC, USB RTC, MLD
IDLE2 11
IDLE1 10
Stop Depends on PxDR register setting
STOP 01
Available to select Operation block Stop
Block
Operate Operate
(2) How to release the Halt mode These HALT states can be released by resetting or requesting an interrupt. The halt release sources are determined by the combination of the states of the interrupt mask register and the halt modes. The details for releasing the HALT status are shown in Table 3.3.5. * Release by interrupt requesting The HALT mode release method depends on the status of the enabled interrupt. When the interrupt request level set before executing the HALT instruction exceeds the value of the interrupt mask register, the interrupt is processed depending on its status after the HALT mode is released, and the CPU status executing the instruction that follows the HALT instruction. When the interrupt request level set before executing the HALT instruction is less than the value of the interrupt mask register, HALT mode release is not executed.(in non-maskable interrupts, interrupt processing is processed after releasing the halt mode regardless of the value of the mask register.) However only for INT0 to INT5, INT6, INT7(unsynchronous interrupt), INTKEY,INTRTC, INTALM interrupts, even if the interrupt request level set before executing the HALT instruction is less than the value of the interrupt mask register, HALT mode release is executed. In this case, the interrupt is processed, and the CPU starts executing the instruction following the HALT instruction, but the interrupt request flag is held at "1". * Release by resetting Release of all halt statuses is executed by resetting. When the STOP mode is released by RESET, it is necessary to allow enough resetting time for operation of the oscillator to stabilize. When releasing the halt mode by resetting, the internal RAM data keeps the state before the "HALT" instruction is executed. However the other settings contents are initialized. (Releasing due to interrupts keeps the state before the "HALT" instruction is executed.)
92CF26A-35
2007-11-21
TMP92CF26A
Table 3.3.5 Source of Halt state clearance and Halt clearance operation Status of Received Interrupt HALT mode
INTWDT INT0 to 5 (Note1) INTKEY INTUSB INT6 to 7(PORT) (Note1) INT6 to 7(TMRB)
Interrupt x
Interrupt Enabled (interrupt level) (interrupt mask) IDLE2 IDLE1
x
Interrupt Disabled (interrupt level) < (interrupt mask) IDLE2
-
STOP
x
*1
IDLE1
-
STOP
-
*1
*2
Source of Halt state clearance
x
*1
*2
x
*1
x x
x
x
x x
INTALM, INTRTC
INTTA0 to 7, INTTP0 INTTB00 to 01, INTTB10 to 11 INTRX,INTTX, INTSBI INTI2S0 to 1, INTLCD, INTAD, INTADHP INTSPIRX,INTSPITX INTRSC, INTRDY INTDMA0 to 5 RESET
x
x
x
x
x
Reset initializes the LSI
: After clearing the Halt mode, CPU starts interrupt processing. : After clearing the Halt mode, CPU resumes executing starting from instruction following the HALT instruction.
x: Cannot be used to release the halt mode. -: The priority level (interrupt request level) of non-maskable interrupts is fixed to 7, the highest priority level. This
combination is not available. *1: Release of the HALT mode is executed after warm-up time has elapsed. *2: 6 interrupts of all 24 INTUSB sources can release Halt state from IDLE1 mode, allowing for the construction of low power dissipation systems. However, the method of use is limited as below.
* Shift to IDLE1 mode : Execute Halt instruction when the flag of INT_SUS or INT_CLKSTOP is "1" ( SUSPEND state ) * Release from IDLE1 mode : Release Halt state by INT_RESUME or INT_CLKON request (release SUSPEND request) Release Halt state by INT_URST_STR or INT_URST_END request(RESET request)
Note: When the Halt mode is cleared by an INT0 interrupt of the level mode in the interrupt enabled status, hold level H until starting interrupt processing. If level L is set before holding level L, interrupt processing is correctly started.
92CF26A-36
2007-11-21
TMP92CF26A
(Example - releasing IDLE1 Mode) An INT0 interrupt clears the Halt state when the device is in IDLE1 Mode.
Address 8200H 8203H 8206H 8209H 820BH 820EH INT0 LD LD LD EI LD HALT (PCFC), 02H (IIMC0), 00H (INTE0), 06H 5 (SYSCR2), 28H ; Sets PC1 to INT0 interrupt. ; Select INT0 interrupt rising edge. ; Sets INT0 interrupt level to 6. ; Sets CPU interrupt level to 5. ; Sets Halt mode to IDLE1 mode. ; Halts CPU. INT0 interrupt routine. RETI 820FH LD XX, XX
92CF26A-37
2007-11-21
TMP92CF26A
(3) Operation a. IDLE2 Mode In IDLE2 Mode, only specific internal I/O operations, as designated by the IDLE2 Setting Register, can take place. Instruction execution by the CPU stops. Figure 3.3.7 illustrates an example of the timing for clearance of the IDLE2 Mode Halt state by an interrupt.
X1 A0~A23 D0~D31
RD
Data Data
WR
Interrupt for releasing Halt IDLE2 mode
Figure 3.3.7 Timing chart for IDLE2 Mode Halt state cleared by interrupt
b. IDLE1 Mode In IDLE1 Mode, only the internal oscillator and the RTC and MLD continue to operate. The system clock stops. In the Halt state, the interrupt request is sampled asynchronously with the system clock; however, clearance of the Halt state (i.e. restart of operation) is synchronous with it. Figure 3.3.8 illustrates the timing for clearance of the IDLE1 Mode Halt state by an interrupt.
X1 A0~A23 D0~D31
RD
Data Data
WR
Interrupt for releasing Halt IDLE1 mode
Figure 3.3.8 Timing chart for IDLE1 Mode Halt state cleared by interrupt
92CF26A-38
2007-11-21
TMP92CF26A
c. STOP Mode When STOP Mode is selected, all internal circuits stop, including the internal oscillator. After STOP Mode has been cleared system clock output starts when the warm-up time has elapsed, in order to allow oscillation to stabilize. Figure 3.3.9 illustrates the timing for clearance of the STOP Mode Halt state by an interrupt.
Warm-up time X1 A0~A23 D0~D31
RD
Data
Data
WD
Interrupt for releasing Halt STOP mode
Figure 3.3.9 Timing chart for STOP Mode Halt state cleared by interrupt
Table 3.3.6 Example of warming-up time after releasing STOP-mode
@fOSCH =10 MHz
SYSCR2 01 (2 )
25.6 s
8
10 (214)
1.6384 ms
11 (216)
6.5536 ms
92CF26A-39
2007-11-21
TMP92CF26A
Table 3.3.7 Input Buffer State Table
Input Buffer State Port Name Input Function Name During Reset
When Used as function Pin D0-D7 P10-P17 P60-P67 P71-P74 P75 P76 P90 P91 P92 P96 *1 P97 PA0-PA7 *1 PC0 PC1 PC2 PC3 PC4-PC7 PF0-PF5 PG0-PG2 PG4,PG5 *2 PG3 *2 PJ5-PJ6 PN0-PN7 PP1-PP2 PP3 PP4 PP5 PR0 PR1-PR3 PT0-PT7 PU0-PU4, PU6,PU7 PU5 PV0-PV2 PV6-PV7 PW0-PW7 PX5 PX7
CTS0
When the CPU is operating
When Used as Input port -
In HALT mode (IDLE2/1/STOP) =1
function Pin OFF Input port - OFF
=0
function Pin Input port -
When Used as When Used as When Used as When Used as
D0-D7 D8-D15 - - NDR/ W
WAIT
OFF 16bit Start OFF Boot Start ON 16bit Start OFF Boot Start ON
ON upon external read - - ON - ON
- - ON - ON ON - ON
- - OFF - OFF -
- RXD0 ,SCLK0 - KI0-KI7 INT0 INT1,TA0IN INT2 INT3,TA2IN - - -
ADTRG
INT4 ON -
ON
ON
OFF
- - ON - ON upon port read
- - ON -
- - ON - OFF
OFF
OFF
- - - INT5 INT6,TB0IN0 INT7,TB1IN0 SPDI - - - - - SDA, SCL - X1USB - EI_PODDATA, EI_SYNCLK, EI_PODREQ, EI_REFCLK, EI_TRGIN, EI_COMRESET - - - - - - ON: The buffer is always turned on. A current flows through the input buffer if the input pin is not driven. IDLE2/DLE1: ON *1: Port having a pull-up/pull-down resistor. Always ON - - ON ON ON ON ON OFF - - - ON ON OFF
PZ0-PZ5
ON
PZ6-PZ7
DBGE
-
D+, DRESET
AM0,AM1 X1,XT1
*2: AIN input does not cause a current to flow through the buffer.
OFF: The buffer is always turned off. - : Not applicable
92CF26A-40
2007-11-21
TMP92CF26A
Table 3.3.8 Output buffer State Table (1/2)
Output Buffer State Port Name Output Function Name During Reset
When Used as function Pin D0-7 P10-17 P40-P47 P50-P57 P60-67 P70 P71 P72 P73 P74 P75 P76 P80 P81 P82 P83 P84 P85 P86 P87 P90 P91 P92 P96 P97 PC0-PC3 PC4 PC5 PC6 PC7 PF0 PF1 PF2 PF3 PF4 PF5 PF7 PG2 PG3 PJ0 PJ1 PJ2 PJ3 PJ4 PJ5 PJ6 PJ7 PK0 PK1 PK2 PK3 PK4 PK5 PK6 PK7 PL0-PL7
CS 2
When the CPU is operating
When Used as Output port - ON
In HALT mode (IDLE2/1/STOP) = 1
function Pin OFF Output port - ON
= 0
function Pin Output port -
When Used as When Used as When Used as When Used as
D0-D7 D8-D15 A0-A7 A8-A15 A16-A23
RD
OFF 16bit Start OFF Boot Start OFF ON 16bit Start ON Boot Start OFF ON
ON upon external write
OFF ON ON
WRLL
WRLU
, NDRE , NDWE OFF
EA24 EA25 R/ W -
CS0
-
ON
-
ON
-
OFF
CS1 , SDCS
, CSZA
CSZB CSZC
SDCS
CS3 , CSXA
ON
ON
ON
OFF
CSZD
, ND0CE , -
ND1CE
CSXB
TXD0 OFF - ON - - ON - - OFF - SCLK0 PX PY - EA26 EA27 EA28 KO8 I2S0CKO I2S0DO I2S0WS I2S1CKO I2S1DO I2S1WS SDCLK MX MY
SDRAS
SDCAS
SDWE
-
-
-
OFF ON ON OFF
ON OFF - - -
, SRLLB ,
SRLUB
, SRWR
ON
ON
ON
OFF
SDLLDQM SDLUDQM NDALE NDCLE SDCKE LCP0 LLOAD LFR LVSYNC LHSYNC LGOE0 LGOE1 LGOE2 LD0-LD7 ON ON ON OFF OFF
92CF26A-41
2007-11-21
TMP92CF26A
Table 3.3.9 Output buffer state table (2/2)
Output Buffer State Port Name Output Function Name During Reset When the CPU is operating
When Used as function Pin PM1 PM2 PM7 PN0-PN7 PP1 PP2 PP3 PP4-PP5 PP6 PP7 PR0 PR1 PR2 PR3 PT0-PT7 PU0-PU6 PU7 PV0 PV1 PV2 PV3-PV4 PV6 PV7 PW0-PW7 PX4 PX5 PX7 PZ0-PZ5 PZ6-PZ7 D+, D- X2 XT2 MLDALM,TA1OUT
MLDALM
In HALT mode (IDLE2/1/STOP) =1
function Pin Output port
=0
function Pin Output port
When Used as Output port
When Used as When Used as When Used as When Used as
, ALARM
ON ON OFF - ON ON - - ON - - OFF - ON OFF
PWE KO0-KO7 TA3OUT TA5OUT TA7OUT - TB0OUT0 TB1OUT0 - SPDO
SPCS
SPCLK LD8-LD15 LD16-LD22 LD23 EO_TRGOUT SCLK0 - - - SDA SCL - CLKOUT, LDIV - - - EO_MCUDATA, EO_MCUREQ - - Always ON - OFF OFF ON ON ON/OF depend on USBC operation - - ON OFF ON ON - ON ON - ON - - OFF ON ON ON ON
OFF OFF ON OFF -
OFF - OFF -
ON
IDLE2/1:ON, STOP: output "H" IDLE2/1:ON, STOP: output "HZ"
ON: The buffer is always turned on. When the bus is released, however, output buffers for some pins are turned off. OFF: The buffer is always turned off.
- : Not applicable
*1: Port having a pull-up/pull-down resistor.
92CF26A-42
2007-11-21
TMP92CF26A
3.4
Boot ROM
The TMP92CF26A contains boot ROM for downloading a user program, and supports two kinds of downloading methods.
3.4.1
Operation Modes
The TMP92CF26A has two operation modes: MULTI mode and BOOT mode. The operation mode is selected according to the AM1 and AM0 pin levels when RESET is asserted. (1) MULTI mode: (2) BOOT mode: After reset, the CPU fetches instructions from external memory and executes them. After reset, the CPU fetches instructions from internal boot ROM and executes them. The boot ROM loads a user program into internal RAM from USB, or via UART, and then branches to the internal RAM. In this way the user program starts boot operation. Table 3.4.2 shows an outline of boot operation. Table 3.4.1 Operation Modes Mode Setting Pins
RESET
Operation Mode
MULTI TEST (Setting prohibited) BOOT (Start from internal boot ROM) TEST (Setting prohibited) Start from external 16-bit bus memory
AM1
0 1 1 0
AM0
1 0 1 0
Table 3.4.2 Outline of Boot Operation Name
(a) (b)
Priority Source
1 2 PC (UART) PC (USB_HOST)
Loading I/F
UART USB
Destination
Internal RAM
Operation after Loading
Branch to internal RAM
92CF26A-43
2007-11-21
TMP92CF26A 3.4.2 Hardware Specifications of Internal Boot ROM
(1) Memory map Figure 3.4.1 shows a memory map of BOOT mode. The boot ROM incorporated in the TMP92CF26A is an 8-Kbyte ROM area mapped to addresses 3FE000H to 3FFFFFH. In MULTI mode, the boot ROM is not mapped and the above area is mapped as an external area.
000000H Internal I/O 001FF0H 002000H 010000H 021FFFH Internal RAM (128 Kbytes)
046000H 04A000H
(Internal Backup RAM 16 Kbytes)
3FE000H Internal Boot ROM (8 Kbytes) 3FFF00H 400000H (B) Reset/Interrupt (Note) Vector Area (256 bytes)
FFFF00H FFFFFFH Note: BROMCR = "1" : (B) when booting BROMCR = "0" : (A) when multi mode
(A) Reset/Interrupt (Note) Vector Area (256 bytes)
Figure 3.4.1 Memory Map of BOOT Mode (2) Switching the boot ROM area to an external area After the boot sequence is executed in BOOT mode, an application system program may start running without a reset being asserted. In this case, it is possible to switch the boot ROM area to an external area.
92CF26A-44
2007-11-21
TMP92CF26A 3.4.3 Outline of Boot Operation
The method for downloading a user program can be selected from two types: from UART, or via USB. After reset, the boot program on the internal boot ROM executes as shown in Figure 3.4.2. Regardless of the downloading method used, the boot program downloads a user program into the internal RAM and then branches to the internal RAM. Figure 3.4.3 shows how the boot program uses the internal RAM (common to all the downloading methods).
Start Yes RESUME check PMCCTL=1 No Clock setting * fSYS = fOSCH * fUSB = fOSCH x 24/5 (a)
(b) UART check No No Yes
Download via UART
USB check Yes Download via USB
Branch to internal RAM 3000h
Branch to internal RAM 46000h
Note 1: To download a user program via USB, a USB device driver and special application software are needed on the PC. Note 2: To download a user program via UART, special application software is needed on the PC. Note 3: The (a), (b) in the above flowchart indicate points where the settings of external port pins are changed. For details, see Table 3.4.3.
Figure 3.4.2 Flowchart for Internal Boot ROM Operation
92CF26A-45
2007-11-21
TMP92CF26A
002000H Work Area for Boot Program (4 Kbytes)
003000H
Download Area for User Program (124 Kbytes) 021FFFH
046000H Work Area for User Program (14 Kbytes) 049800H Stack Area for Boot program (2K bytes) 049FFFH
Figure 3.4.3 How the Boot Program Uses Internal RAM
92CF26A-46
2007-11-21
TMP92CF26A
(1) Port settings Table 3.4.3 shows the port settings by the boot program. When designing your application system, please also refer to Table 3.4.4 for recommended pin connections for using the boot program. The boot program only sets the ports shown in the table below; other ports are left as they are after reset or at startup of the boot program. Table 3.4.3 Port Settings by the Boot Program Port Name
UART P90 P91 USB --- --- PU6
Function Name
TXD0 RXD0 D+ D- PUCTL
I/O (a)
Output Input I/O I/O Output No change from after reset state (input port) No change from after reset state (input port) Set as RXD0 input pin
Description (b)
No change from (a)
(c)
Set as TXD0 output pin No change from (b)
No change Set as output port No change from (b)
92CF26A-47
2007-11-21
TMP92CF26A
Table 3.4.4 Recommended Pin Connections Port Name
UART P90 P91
Function Name
TXD0 RXD0
I/O
Output Input
Recommended Pin Connections for Each Download Method UART
Connect to the level shifter.
USB
No special setting is needed for booting via USB. Add a pull-up resistor (100 krecommended) to prevent transition to UART processing.
USB
---
D+
I/O
No special setting is needed for booting via UART.
Connect to the USB connector by adding a dumping resistor (27recommended) and a programmable pull-up resistor (1.5 krecommended). When USB is not accessed, the pin level should be fixed with a resistor to prevent flow-through current. Connect to the USB connector by adding a dumping resistor (27 recommended). When USB is not accessed, the pin level should be fixed with a resistor to prevent flow-through current. This pin is used to control ON/OFF of the D+ pin's pull-up resistor. Add a switch externally so that the pull-up is turned on when "1". Reset sets this pin as an input port, so add a pull-down resistor (100k recommended).
---
D-
I/O If USB is not used, add a pull-up or pull-down resistor to prevent flow-through current on the D+/D- pins.
PU6
PUCTL
Output
-
Note 1: When a user program is downloaded from UART and USB is used in the system, the pull-up resistor for USB's D+ pin should not be turned on in BOOT mode. Note 2: When a user program is downloaded via USB, do not start the UART application software on the PC. Note 3: When a user program is downloaded via UART, do not connect a USB connector. Note 4: When USB is not used, the D+ and D- pins must be pulled up or down to prevent flow-through current.
92CF26A-48
2007-11-21
TMP92CF26A
(2) I/O register settings Table 3.4.5 shows the I/O registers that are set by the boot program. After the boot sequence, if execution moves to an application system program without a reset being asserted, the settings of these I/O registers must be taken into account. Also note that the registers in the CPU and the internal RAM remain in the state after execution of the boot program. Table 3.4.5 I/O Register Settings by Boot Program Register Name
WDMOD WDCR SYSCR0 SYSCR1 SYSCR2 PLLCR0 PLLCR1
Set Value
00H B1H 70H 00H 2CH 00H 00H or 60H
Description
Watchdog timer not active Watchdog timer disabled High-frequency and low-frequency oscillators operating Clock gear = 1/1 Initial value PLL clock not used Normally PLL is disabled. However, only in the case of booting via USB, PLL is activated for USB. USB interrupt level setting INTTC interrupt level setting
INTEUSB INTETC01
04H 44H
Note: The values to be set in the I/O registers for UART and USB are not described here. If these functions are needed in a user program, set each I/O register as necessary.
92CF26A-49
2007-11-21
TMP92CF26A 3.4.4 Downloading a User Program via UART
(1) Connection example Figure 3.4.4 shows an example of connections for downloading a user program via UART (using a 16-bit NOR Flash memory device as program memory).
UART 3 pins TXD Level RXD Shifter
RTS
PC
TXD0 P90 (OUT) RXD0, P91 (IN)
D+ DP82, CS2 P70, RD PJ2, SRWR
CE OE WE
AM0
TMP92CF26A D0 to D15
NOR Flash Memory D0 toD15
AM1 A1 to 20 A0 toA19
Note: When USB is not used, add a pull-up or pull-down resistor to the D+ and D- pins to prevent flow-through current.
Figure 3.4.4 UART Connection Example
(2) UART interface specifications SIO channel 0 is used for downloading a user program. The UART communication format in BOOT mode is shown below. Before booting, the PC must also be set up with the same conditions. Although the default baud rate is 9600 bps, this can be changed as shown in Table 3.4.8.
Serial transfer mode: Data length Parity bit STOP bit Handshake Baud rate (default) : UART (asynchronous) mode, full-duplex : 8 bits : None : 1 bit : None : 9600 bps
92CF26A-50
2007-11-21
TMP92CF26A
(3) UART data transfer format Table 3.4.6 to Table 3.4.11 show the supported frequencies, data transfer format, baud rate modification command, operation command, and version management information, respectively. Please also refer to the description of boot program operation later in this section. Table 3.4.6 Supported Frequencies (X1)
6.00 MHz 8.00 MHz 9.00 MHz 10.00 MHz Note: The built-in PLL (clock multiplier) is not used regardless of the oscillation frequency.
Table 3.4.7 Transfer Format
Byte Number to Transfer Boot ROM 2nd byte 3rd byte to 6th byte 7th byte 8th byte 9th byte 10th byte to (n - 4)th byte (n - 3)th byte (n - 2)th byte (n - 1)th byte n'th byte - RAM - Branch to user program start address "Error code x 3" means that the error code is transmitted three times. For example, if the error code is 62H, the TMP92CF26A transmits 62H three times. For error codes, see (4)-b). - - User program start command (C0H) (See Table 3.4.9.) OK: SUM (High) (See (4)-c).) OK: SUM (Low) - OK: Echo back data (C0H) Error: Error code x 3 - Baud rate modification command (See Table 3.4.8.) - User program Intel Hex format (binary) Frequency information - OK: Echo back data Error: Error code x 3 New baud rate NG: Operation stop by checksum error - - 1st byte Transfer data from PC to TMP92CF26A Matching data (5AH) Baud Rate 9600 bps Transfer data from TMP92CF26A to PC - (Frequency measurement and baud rate auto setting) OK: Echo back data (5AH) Error: No transfer Version management information (See Table 3.4.10)
92CF26A-51
2007-11-21
TMP92CF26A
Table 3.4.8 Baud Rate Modification Command Baud Rate (bps)
Modification Command
9600
28H
19200
18H
38400
07H
57600
06H
115200
03H
Note 1: If fOSCH (oscillation frequency) is 10.0 MHz, 57600 and 115200 bps are not supported. Note 2: If fOSCH (oscillation frequency) is 6.00, 8.00, or 9.00 MHz, 38400, 57600, and 115200 bps are not supported.
Table 3.4.9 Operation Command Operation Command
C0H
Operation
User program start
Table 3.4.10 Version Management Information Version Information
FRM1
ASCII Code
46H, 52H, 4DH, 31H
Table 3.4.11 data of measuring frequency X1-X2 oscillator 6.000 8.000 9.000 frequency (MHz)
09H 0AH 08H
10.000
0BH
(4) Description of the UART boot program operation The boot program receives a user program sent from the PC via UART and transfers it to the internal RAM. If the transfer ends normally, the boot program calculates SUM and sends the result to the PC before executing the user program. The execution start address is the first address received. The boot program enables users to perform customized on-board programming. When UART is used to download a user program, the maximum allowed program size is 124 Kbytes (3000H - 21FFFH). (The extended Intel Hex format is supported.) a) Operation procedure 1. Connect the serial cable. This must be done before the microcontroller is reset. 2. Set the AM1 and AM0 pins to "1" and reset the microcontroller. 3. The receive data in the 1st byte is matching data (5AH). Upon starting in BOOT mode, the boot program goes to a state in which it waits for matching data. When matching data is received, the initial baud rate of the serial channel is automatically set to 9600 bps. 4. The 2nd byte is used to echo back 5AH to the PC upon completion of the automatic baud rate setting in the 1st byte. If automatic baud rate setting fails, the boot program stops operation. 5. The 3rd through 6th bytes are used to send the version management information of the boot program in ASCII code. The PC should check that the correct version of the boot program is used. 6. The 7th byte is used to send information on the measured frequency. The PC should check that the frequency of the resonator is measured correctly.
92CF26A-52
2007-11-21
TMP92CF26A
7.
The receive data in the 8th byte is baud rate modification data. The five kinds of baud rate modification data shown in Table 3.4.8 are available. Even when the baud rate is not changed, the initial baud rate data (28H: 9600 bps) must be sent. Baud rate modification becomes effective after the echo back transmission is completed. The 9th byte is used to echo back the received data to the PC when the data received in the 8th byte is one of the baud rate modification data corresponding to the operating frequency of the microcontroller. Then, the baud rate is changed. If the received baud rate data does not correspond to the operating frequency, the boot program stops operation after sending the baud rate modification error code (62H). The receive data in the 10th to (n-4)th bytes is received as binary data in Intel Hex format. No echo back data is returned to the PC. The boot program ignores received data and does not send error code to the PC until it receives the start mark (3AH for ":") of Intel Hex format. After receiving the start mark, the boot program receives a range of data from record length to checksum and writes the received data to the specified RAM addresses successively. If a receive error or checksum error occurs, the boot program stops operation without sending error code to the PC. The boot program executes the SUM calculation routine upon detecting the end record. Thus, after sending the end record, the PC should be placed in a state in which it waits for SUM data.
8.
9.
10. The (n-3)th and (n-2)th bytes are used to send the SUM value to the PC in the order of upper byte and lower byte. For details on how to calculate SUM, see "SUM calculation" to be described later. SUM calculation is performed after detecting the end record only when no receives error or checksum error has occurred. Immediately after SUM calculation is completed, the boot program sends the SUM value to the PC. After sending the end record, the PC should determine whether or not writing to RAM has completed successfully based on whether or not the SUM value is received from the boot program. 11. After sending the SUM value, the boot program waits for the user program start command (C0H). If the SUM value is correct, the PC should send the user program start command in the (n-1)th byte. 12. The n'th byte is used to echo back the user program start command to the PC. After sending the echo back data, the boot program sets the stack pointer to 4A000H and jumps to the address that is received first as Intel Hex format data. 13. If the user program start command is not correct or a receive error has occurred, the boot program stops operation after sending the error code to the PC three times.
92CF26A-53
2007-11-21
TMP92CF26A
b) Error codes The boot program uses the error codes shown in Table 3.4.12 to notify the PC of its processing status. Table 3.4.12 Error Codes Error Code
62H 64H A1H A3H Unsupported baud rate Invalid operation command Framing error in received data Overrun error in received data
Meaning
Note 1: If a receive error occurs while a user program is being received, no error code will be sent to the PC. Note 2: After sending an error code, the boot program stops operation.
c)
SUM calculation 1. Calculation method SUM is calculated by adding data in bytes and is returned in words, as explained below.
Example: If the data to be calculated consists of the 4 bytes shown to the left, SUM is calculated as follows: A1H + B2H + C3H + D4H = 02EAH SUM (HIGH) = 02H SUM (LOW) = EAH
A1H B2H C3H D4H
2.
Data to be calculated SUM is calculated from the data at the first received address through the last received address. Even if received addresses are not continuous, unwritten addresses are also included in SUM calculation. The user program should not contain unwritten gaps.
92CF26A-54
2007-11-21
TMP92CF26A
d)
Notes on Intel Hex format (binary) 1. After receiving the checksum of a record, the boot program waits for the start mark (3AH for ":") of the next record. If data other than 3AH is received between records, it is ignored. Once the PC program has finished sending the checksum of an end record, it must wait for 2 bytes of data (upper and lower bytes of SUM) before sending any other data. This is because after receiving the checksum of an end record, the boot program calculates SUM and returns the result to the PC in 2 bytes. Writing to areas other than internal RAM may cause incorrect operation. To transfer a record, set the paragraph address to 0000H. Since the address pointer is initially set to 00H, the record type to be transferred first does not have to be an address record. Addresses 3000H to 21FFFH are allocated as the user program download area. A user program in Intel Hex format (ASCII codes) must be converted into binary data in advance, as explained in the example below.
Example: How to convert an Intel Hex file into binary format The following shows how an Intel Hex format file is displayed on a text editor. : 103000000607F100030000F201030000B1F16010B7 : 00000001FF However, the actual data consists of ASCII codes, as shown below. 3A3130333030303030303630374631303030333030303046323031303330303030 423146313630313042370D0A3A303030303030303146460D0A Thus, the ASCII codes must be converted into binary data based on the conversion rules shown in the table below.
2.
3. 4. 5. 6.
ASCII Code 3A 30 to 39 41 or 61 42 or 62 43 or 63 44 or 64 45 or 65 46 or 66 0D0A Intel Hex format Data record
Binary Data 3A (Only 3A remains the same.) 0 to 9 A B C D E F Delete
3A 10 3000 00 0607F100030000F201030000B1F16010 B7 Data Record type Address Record length Checksum
End record
: (Start mark) 3A 00 0000 01 FF Data Record type Address Record length : (Start mark)
92CF26A-55
2007-11-21
TMP92CF26A
e)
User program receive error If either of the following error conditions occurs while a user program is being received, the boot program stops operation. If the record type is other than 00H, 01H, or 02H If a checksum error occurs
f)
Measured frequency/baud rate error When the boot program receives matching data, it measures the oscillation frequency. If an error is within plus or minus 3%, the boot program decides on that frequency. Each baud rate includes a setting error as shown in Table 3.4.13. For example, in the case of 10.00 MHz /9600 bps, the baud rate is actually set at 9615.38 bps. To establish communication, the sum of the baud rate setting error and the measured frequency error must be within plus or minus 3 %. Table 3.4.13 Baud Rate Setting Errors (%) 9600 bps 19200 bps
0.2 0.2 -0.7 0.2
38400 bps
- - - -1.4
57600 bps
- - - -
115200 bps
- - - - -: Not supported
6.000 MHz 8.000 MHz 9.000 MHz 10.000 MHz
0.2 0.2 0.2 0.2
92CF26A-56
2007-11-21
TMP92CF26A
(5) Others a) Handshake function Although the CTS pin is available in the TMP92CF26A, the boot program does not use it for transfer control. b) RS-232C connector The RS-232C connector must not be connected or disconnected while the boot program is running. c) Software on the PC When downloading a user program via UART, special application software is needed on the PC.
92CF26A-57
2007-11-21
TMP92CF26A 3.4.5 Downloading a User Program via USB
(1) Connection example Figure 3.4.5 shows an example of connections for downloading a user program via USB (using a 16-bit NOR Flash memory device as program memory).
PUCTL R4 = 100 k R2 = 27 R3 = 27
PU6, LD22
RXD,P91 P82, CS2 P70, RD PJ2, SRWR
CE OE WE
R1 = 1.5 k PC
D+ D- AM0 AM1
TMP92CF26A D0 to D15
NOR Flash D0 to D15
A1 to A20
A0 to A19
Note 1: The value of pull-up and pull-down resistors are recommended values. Note 2: The PU6 and LD22 pins are assigned as PUCTL (pull-up control) output for USB. Be careful about this if the system uses the 24-bit TFT display function. Note 3: Since the input gates of the D+ and D- pins are always open even at unused (unaccessed) times, these pins must be set to a fixed level to prevent flow-through current. Although the level setting is not specified in the above diagram, be sure to fix the level of the D+ and D- pins by referring to the chapter on USB.
Figure 3.4.5 USB Connection Example
(2) USB interface specifications When a user program is downloaded via USB, the oscillation frequency should be set to 10.00 MHz. The transfer speed should be fixed to full speed (12 Mbps). The boot program uses the following two transfer types. Table 3.4.14 Transfer Types Used by the Boot Program Transfer Type
Control Transfer Bulk Transfer
Description
Used for transmitting standard requests and vendor requests. Used for responding to vendor requests and transmitting a user program.
92CF26A-58
2007-11-21
TMP92CF26A
The following shows an overview of the USB communication flow.
(Legends) Control Transfer Bulk Transfer
Host (PC) Connection Recognition Send GET_DISCRIPTOR
TMP92CF26A
Send DESCRIPTOR information
Send the microcontroller information command Prepare microcontroller information data
Send microcontroller information data Check data
Data Transfer Convert Intel Hex format data into binary data Send the microcontroller information command Prepare microcontroller information data
Send microcontroller information data
Check data Send the user program transfer start command Load the received data into the specified RAM address area & prepare microcontroller information data (If the received data cannot be loaded into RAM for some reason, it is discarded.) Transfer End Processing Transmit the transfer result command 2 seconds after completion of user program transfer Check data Send the transfer result command
Send data
Send a user program
Send transfer result data
Prepare transfer result data
Branch to internal RAM
Figure 3.4.6 Overall Flowchart
92CF26A-59
2007-11-21
TMP92CF26A
Table 3.4.15 Vendor Request Commands Command Name
Microcontroller information command User program transfer start command
Value of bRequest
00H
Operation
Notes
Send microcontroller Microcontroller information data is information sent by bulk IN transfer after the setup stage is completed. Receive a user program Set the size of a user program in wIndex. The user program is received by bulk OUT transfer after the setup stage is completed.
02H
User program transfer result command
04H
Send the transfer result
Transfer result data is sent by bulk IN transfer after the setup stage is completed.
Table 3.4.16 Setup Command Data Structure Field Name
bmRequestType 40H
Value
D7 D6-D5 D4-D0 2: Vendor 0: Device
Meaning
0: Host to Device
bRequest
00H, 02H, 04H
00H: Microcontroller information 02H: User program transfer start 04H: User program transfer result
wValue wIndex wLength
00H~FFFFH 00H~FFFFH 0000H
Own data number (Not used by boot program) User program size (Used when starting a user program transfer) Fixed
92CF26A-60
2007-11-21
TMP92CF26A
Table 3.4.17 Standard Request Commands Standard Request
GET_STATUS CLEAR_FEATURE SET_FEATURE SET_ADDRESS GET_DISCRIPTOR SET_DISCRIPTOR GET_CONFIGRATION SET_CONFIGRATION GET_INTERFACE SET_INTERFACE SYNCH_FRAME
Response Method
Automatic response by hardware Automatic response by hardware Automatic response by hardware Automatic response by hardware Automatic response by hardware Not supported Automatic response by hardware Automatic response by hardware Automatic response by hardware Automatic response by hardware Ignored
Table 3.4.18 Information Returned by GET_DISCRIPTOR DeviceDescriptor Field Name
Blength BdescriptorType BcdUSB BdeviceClass BdeviceSubClass BdeviceProtocol BmaxPacketSize0 IdVendor IdProduct BcdDevice Imanufacturer Iproduct IserialNumber BnumConfigurations 12H 01H 0110H 00H 00H 00H 40H 0930H 6504H 0001H 00H 00H 00H 01H
Value
18 bytes Device descriptor USB Version 1.1
Meaning
Device class (Not in use) Sub command (Not in use) Protocol (Not in use) EP0 maximum packet size (64 bytes) Vendor ID Product ID (0) Device version (v0.1) Index value of string descriptor indicating manufacturer name Index value of string descriptor indicating product name Index value of string descriptor indicating product serial number There is one configuration.
92CF26A-61
2007-11-21
TMP92CF26A
ConfigrationDescriptor Field Name
bLength bDescriptorType wTotalLength 09H 02H 0020H
Value
9 bytes
Meaning
Configuration descriptor Total length (32 bytes) which each descriptor of both configuration descriptor, interface and endpoint is added. There is one interface. Configuration number 1 Index value of string descriptor indicating configuration name (Not in use) Bus power Maximum power consumption (49 mA)
bNumInterfaces bConfigurationValue iConfiguration bmAttributes MaxPower
01H 01H 00H 80H 31H
InterfaceDescriptor Field Name
bLength bDescriptorType bInterfaceNumber bAlternateSetting bNumEndpoints bInterfaceClass bInterfaceSubClass bInterfaceProtocol iIinterface 09H 04H 00H 00H 02H FFH 00H 50H 00H Bulk only protocol Index value of string descriptor indicating interface name (Not in use)
Value
9 bytes Interface descriptor Interface number 0
Meaning
Alternate setting number 0 There are two endpoints. Specified device
EndpointDescriptor Field Name
blength bDescriptorType bEndpointAddress bmAttributes wMaxPacketSize bInterval bLength bDescriptor bEndpointAddress bmAttributes wMaxPacketSize bInterval 07H 05H 82H 02H 0040H 00H 7 bytes Endpoint descriptor EP2 = IN Bulk transfer Payload 64 bytes (Ignored for bulk transfer) 07H 05H 01H 02H 0040H 00H 7 bytes Endpoint descriptor EP1= OUT Bulk transfer Payload 64 bytes (Ignored for bulk transfer)
Value
Meaning
92CF26A-62
2007-11-21
TMP92CF26A
Table 3.4.19 Information Returned for the Microcontroller Information Command Microcontroller Information
TMP92CZ26
ASCII Code
54H, 4DH, 50H, 39H, 32H, 43H, 5AH, 32H, 36H,20H, 20H, 20H, 20H, 20H, 20H
Note: TMP92CF26AXBG share ROM code with TMP92CZ26AXBG. Please be careful.
Table 3.4.20 Information Returned for the User Program Transfer Result Command Transfer Result
No error User program not received Received file not in Intel Hex format User program size error Download address error Protocol error or other error
Value
00H 02H 04H 06H 08H 0AH
Error Conditions
The user program transfer result is received without the user program transfer start command being received first. The first data of a user program is not ":" (3AH). The size of a received user program is larger than the value set in wIndex of the user program transfer start command. The specified user program download address is not in the designated area. The user program transfer start or user program transfer result command is received first. A checksum error is detected in the Intel Hex file. A record type error is detected in the Intel Hex file. The length of an address record in the Intel Hex file is 3 or longer. The length of an end record in the Intel Hex file is other than 0.
92CF26A-63
2007-11-21
TMP92CF26A
(3) Description of the USB boot program operation The boot program loads a user program in Intel Hex format sent from the PC into the internal RAM. When the user program has been loaded successfully, the user program starts executing from the first address received. The boot program thus enables users to perform customized on-board programming. a. Operation procedure 1. 2. 3. 4. Connect the USB cable. Set the AM0 and AM1 pins to "1" and reset the microcontroller. After recognizing USB connection, the PC checks the information on the connected device using the GET_DISCRIPTOR command. The PC sends the microcontroller information command by control transfer (vendor request). After the setup stage is completed, the PC checks microcontroller information data by bulk IN transfer. Upon receiving the microcontroller information command, the boot program prepares microcontroller information in ASCII code. The PC prepares the user program to be loaded by converting an Intel Hex file into binary format. The PC sends the user program transfer start command by control transfer (vendor request). After the setup stage is completed, the PC transfers the user program by bulk OUT transfer. After the user program has been transferred, the PC waits for about two seconds and then sends the user program transfer result command by control transfer (vendor request). After the setup stage is completed, the PC checks the transfer result by bulk IN transfer. Upon receiving the user program transfer result command, the boot program prepares the transfer result value to be returned.
5. 6. 7.
8.
9.
10. If the transfer result is other than OK, the boot program enters the error processing routine and will not automatically recover from it. In this case, terminate the device driver on the PC and retry from step 2.
92CF26A-64
2007-11-21
TMP92CF26A
b. Notes on the user program format (binary) 1. After receiving the checksum of a record, the boot program waits for the start mark (3AH for ":") of the next record. If data other than 3AH is received between records, it is ignored. Since the address pointer is initially set to 00H, the record type to be transferred first does not have to be an address record. Addresses 3000H to 21FFFH (124 Kbytes) are allocated as the user program download area. The user program should be contained within this area.
2. 3.
Note: In USB transfer, the size of program is set by wIndex from addresses 0000H to FFFFH. Therefore, the transferred Object size becomes 64K byte max. Please be careful.
4.
A user program in Intel Hex format (normally written in ASCII code) must be converted into binary data before it can be transferred. See the example below for how to convert an Intel Hex file into binary format. When a user program is downloaded via USB, the maximum allowed record length is 250 bytes.
Example: Transfer data when writing 16-byte data in Intel Hex format from address 3000H The following shows how an Intel Hex format file is displayed on a text editor. : 103000000607F100030000F201030000B1F16010B7 : 00000001FF However, the actual data consists of ASCII codes, as shown below. 3A3130333030303030303630374631303030333030303046323031303330303030 423146313630313042370D0A3A303030303030303146460D0A Thus, the ASCII codes must be converted into binary data based on the conversion rules shown in the table below.
ASCII Code 3A 30~39 41 or 61 42 or 62 43 or 63 44 or 64 45 or 65 46 or 66 0D0A
Binary Data 3A (Only 3A remains the same.) 0~9 A B C D E F Delete
The above Intel Hex file is converted into binary data as follows: Data record 3A 10 3000 00 0607F100030000F201030000B1F16010 B7 Data Record type Address Record length : (Start mark\) End record 3A 00 0000 01 FF Checksum Record type Address Record length : (Start mark) Checksum
92CF26A-65
2007-11-21
TMP92CF26A
(4) Others a) USB connector The USB connector must not be connected or disconnected while the boot program is running. b) Software on the PC To download a user program via USB, a USB device driver and special application software are needed on the PC.
92CF26A-66
2007-11-21
TMP92CF26A
3.5
Interrupts
Interrupts are controlled by the CPU Interrupt Mask Register (bits 12 to 14 of the Status Register) and by the built-in interrupt controller. TMP92CF26A has a total of 56 interrupts divided into the following five types: Interrupts generated by CPU: 9 sources * Software interrupts: 8 sources * Illegal Instruction interrupt: 1 source Internal interrupts: 38 sources * Internal I/O interrupts: 30 sources * * Micro DMA Transfer End interrupts /HDMA Transfer End interrupts: 6 sources Micro DMA Transfer End interrupts: 2 source
External interrupts: 9 sources * Interrupts on external pins (INT0 to INT7, INTKEY) A fixed individual interrupt vector number is assigned to each interrupt source. Any one of six levels of priority can also be assigned to each maskable interrupt. Non-maskable interrupts have a fixed priority level of 7, the highest level. When an interrupt is generated, the interrupt controller sends the priority of that interrupt to the CPU. When more than one interrupt is generated simultaneously, the interrupt controller sends the priority value of the interrupt with the highest priority to the CPU. (The highest priority level is 7, the level used for non-maskable interrupts.) The CPU compares the interrupt priority level which it receives with the value held in the CPU interrupt mask register . If the priority level of the interrupt is greater than or equal to the value in the interrupt mask register, the CPU accepts the interrupt. However, software interrupts and illegal instruction interrupts generated by the CPU, and are processed irrespective of the value in . The value in the interrupt mask register can be changed using the EI instruction (EI num sets to num). For example, the command EI3 enables the acceptance of all non-maskable interrupts and of maskable interrupts whose priority level, as set in the interrupt controller, is 3 or higher. The commands EI and EI0 enable the acceptance of all non-maskable interrupts and of maskable interrupts with a priority level of 1 or above (hence both are equivalent to the command EI1). The DI instruction (Sets to 7) is exactly equivalent to the EI7 instruction. The DI instruction is used to disable all maskable interrupts (since the priority level for maskable interrupts ranges from 0 to 6). The EI instruction takes effect as soon as it is executed. In addition to the general-purpose interrupt processing mode described above, there is also a micro DMA processing mode that can transfer data to internal/external memory and built-in I/O, and HDMA processing mode. In micro DMA mode the CPU, and in HDMA mode the DMA controller automatically transfers data in 1byte, 2byte or 4byte blocks. HDMA mode allows transfer faster than Micro DMA mode. In addition, the TMP92CF26A also has a software start function in which micro DMA and HDMA processing is requested in software rather than by an interrupt. Figure 3.5.1 is a flowchart showing overall interrupts processing.
92CF26A-67
2007-11-21
TMP92CF26A
Interrupt processing
DMA soft start request
Interrupt specified by DMA start vector ?
YES
Clear interrupt request flag NO
Interrupt vector calue "V" read interrupt request F/F clear
Start specified by HDMA
YES
to HDMA processing flow
General-purpose interrupt processing PUSH PC PUSH SR SR Level of accepted interrupt + 1 INTNEST INTNEST + 1
NO Data transfer by micro DMA Micro DMA processing
COUNT COUNT - 1 PC (FFFF00H + V) COUNT = 0 Interrupt processing program NO YES
Clear vector register generating micro DMA transfer end interrupt (INTTC0)
RETI instruction POP SR POP PC INTNEST INTNEST - 1
End
Figure 3.5.1 Interrupt processing Sequence
92CF26A-68
2007-11-21
TMP92CF26A 3.5.1 General-purpose Interrupt Processing
When the CPU accepts an interrupt, it usually performs the following sequence of operations. However, in the case of software interrupts and illegal instruction interrupts generated by the CPU, the CPU skips steps (1) and (3), and executes only steps (2), (4), and (5). (1) The CPU reads the interrupt vector from the interrupt controller. When more than one interrupt with the same priority level has been generated simultaneously, the interrupt controller generates an interrupt vector in accordance with the default priority and clears the interrupt requests. (The default priority is determined as follows: The smaller the vector value, the higher the priority.) (2) The CPU pushes the program counter (PC) and status register (SR) onto the top of the stack (Pointed to by XSP). (3) The CPU sets the value of the CPU's interrupt mask register to the priority level for the accepted interrupt plus 1. However, if the priority level for the accepted interrupt is 7, the register's value is set to 7. (4) The CPU increments the interrupt nesting counter INTNEST by 1. (5) The CPU jumps to the address given by adding the contents of address FFFF00H + the interrupt vector, then starts the interrupt processing routine. On completion of interrupt processing, the RETI instruction is used to return control to the main routine. RETI restores the contents of the program counter and the status register from the stack and decrements the interrupt nesting counter INTNEST by 1. Non-maskable interrupts cannot be disabled by a user program. Maskable interrupts, however, can be enabled or disabled by a user program. A program can set the priority level for each interrupt source. (A priority level setting of 0 or 7 will disable an interrupt request.) If an interrupt request is received for an interrupt with a priority level equal to or greater than the value set in the CPU interrupt mask register , the CPU will accept the interrupt. The CPU interrupt mask register is then set to the value of the priority level for the accepted interrupt plus 1. If during interrupt processing, an interrupt is generated with a higher priority than the interrupt currently being processed, or if, during the processing of a non-maskable interrupt processing, a non-maskable interrupt request is generated from another source, the CPU will suspend the routine which it is currently executing and accept the new interrupt. When processing of the new interrupt has been completed, the CPU will resume processing of the suspended interrupt. If the CPU receives another interrupt request while performing processing steps (1) to (5), the new interrupt will be sampled immediately after execution of the first instruction of its interrupt processing routine. Specifying DI as the start instruction disables nesting of maskable interrupts. A reset initializes the interrupt mask register to 111, disabling all maskable interrupts. Table 3.5.1 shows the TMP92CF26A interrupt vectors and micro DMA start vectors. FFFF00H to FFFFFFH (256 bytes) is designated as the interrupt vector area.
92CF26A-69
2007-11-21
TMP92CF26A
Table 3.5.1 TMP92CF26A Interrupt Vectors and Micro DMA/HDMA Start Vectors Default Priority
1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 Maskable Non maskable
Type
Interrupt Source and Source of Micro DMA Request
Reset or [SWI0] instruction [SWI1] instruction Illegal instruction or [SWI2] instruction [SWI3] instruction [SWI4] instruction [SWI5] instruction [SWI6] instruction [SWI7] instruction (Reserved) INTWD: Watchdog timer Micro DMA (Note 2) INT0: INT0 pin input INT1: INT1 pin input INT2: INT2 pin input INT3: INT3 pin input INT4: INT4 pin input (TSI) INTALM: ALM(8KHz, 512Hz, 64Hz, 2Hz, 1Hz) INTTA4: 8-bit timer 4 INTTA5: 8-bit timer 5 INTTA6: 8-bit timer 6 INTTA7: 8-bit timer 7 INTP0: Protect 0 (Write to SFR) (Reserved) INTTA0: 0 INTTA1: 8-bit timer 1 INTTA2: 8-bit timer 2 INTTA3: 8-bit timer 3 INTTB0: 16-bit timer 0 INTTB1: 16-bit timer 0 INTKEY: Key wakeup INTRTC: RTC (Alarm interrupt) (Reserved) INTLCD: LCDC INTRX: Serial receive end INTTX: Serial transmission end INTTB10: 16-bit timer 1 INTTB11: 16-bit timer 1 INT5: INT5 pin input INT6: INT6 pin input INT7: INT7 pin input INTI2S0: I2S (Channel 0) INTI2S1: I2S (Channel 1) INTADM: AD Monitor function INTSBI: SBI INTSPIRX: SPIC receive INTSPITX: SPIC transmission INTRSC: NAND Flash controller INTRDY: NAND Flash controller INTUSB: USB (Reserved) (Reserved)
Vector Value
0000H 0004H 0008H 000CH 0010H 0014H 0018H 001CH 0020H 0024H - 0028H 002CH 0030H 0034H 0038H 003CH 0040H 0044H 0048H 004CH 0050H 0054H 0058H 005CH 0060H 0064H 0068H 006CH 0070H 0074H 0078H 007CH 0080H 0084H 0088H 008CH 0090H 0094H 0098H 009CH 00A0H 00A4H 00A8H 00ACH 00B0H 00B4H 00B8H 00BCH 00C0H 00C4H
Micro DMA Address Refer /HDMA Start to Vector Vector
FFFF00H FFFF04H FFFF08H FFFF0CH FFFF10H FFFF14H FFFF18H FFFF1CH FFFF20H FFFF24H - FFFF28H FFFF2CH FFFF30H FFFF34H FFFF38H FFFF3CH FFFF40H FFFF44H FFFF48H FFFF4CH FFFF50H FFFF54H FFFF58H FFFF5CH FFFF60H FFFF64H FFFF68H FFFF6CH FFFF70H FFFF74H FFFF78H FFFF7CH FFFF80H FFFF84H FFFF88H FFFF8CH FFFF90H FFFF94H FFFF98H FFFF9CH FFFFA0H FFFFA4H FFFFA8H FFFFACH FFFFB0H FFFFB4H FFFFB8H FFFFBCH FFFFC0H FFFFC4H - 0AH(Note 1) 0BH 0CH 0DH 0EH 0FH 10H 11H 12H 13H 14H 15H 16H 17H 18H 19H 1AH 1BH 1CH 1DH 1EH 1FH 20H (Note 1) 21H 22H 23H 24H 25H 26H 27H 28H 29H 2AH 2BH 2CH 2DH 2EH 2FH 30H 31H
92CF26A-70
2007-11-21
TMP92CF26A
Default Priority
51 52 53 54 55 56 57 58 59 60 - to -
Type
Interrupt Source and Source of Micro DMA Request
INTADHP: AD most priority conversion end INTAD: AD conversion end INTTC0/INTDMA0: Micro DMA0 /HDMA0 end INTTC1/INTDMA1: Micro DMA1 /HDMA1 end INTTC2/INTDMA2: Micro DMA2 /HDMA2 end INTTC3/INTDMA3: Micro DMA3 /HDMA3 end
Vector Value
00C8H 00CCH 00D0H 00D4H 00D8H 00DCH 00E0H 00E4H 00E8H 00ECH 00F0H : 00FCH
Micro DMA Address Refer /HDMA Start to Vector Vector
FFFFC8H FFFFCCH FFFFD0H FFFFD4H FFFFD8H FFFFDCH FFFFE0H FFFFE4H FFFFE8H FFFFECH FFFFF0H : FFFFFCH 32H 33H 34H 35H 36H 37H 38H 39H 3AH 3BH - to -
Maskable
INTTC4/INTDMA4: Micro DMA4 /HDMA4 end INTTC5/INTDMA5: Micro DMA5 /HDMA5 end INTTC6 INTTC7 (Reserved) : Micro DMA6 end : Micro DMA7 end
Note 1: When initiating micro DMA/HDMA , set at edge detect mode. Note 2 : Micro DMA default priority. Micro DMA initiation takes priority over other maskable interrupt.
92CF26A-71
2007-11-21
TMP92CF26A 3.5.1 Micro DMA processing
In addition to general-purpose interrupt processing, the TMP92CF26A also includes a micro DMA function and HDMA function. This section explains about Micro DMA function. For the HDMA function, please refer 3.23 DMA controller. Micro DMA processing for interrupt requests set by micro DMA is performed at the highest priority level for maskable interrupts (Level 6), regardless of the priority level of the interrupt source. Because the micro DMA function is implemented through the CPU, when the CPU is placed in a stand-by state (IDLE2, IDLE1, STOP) by a HALT instruction, the requirement of the micro DMA will be ignored (Pending). Micro DMA supports 8 channels and can be transferred continuously by specifying the micro DMA burst function as below.
Note: When using the micro DMA transfer end interrupt, always write "1" to bit 7 of SIMC register.
(1) Micro DMA operation When an interrupt request is generated by an interrupt source that specified by the micro DMA /HDMA start vector register, and Micro DMA start is specified by DMA selection register, the micro DMA triggers a micro DMA request to the CPU at interrupt priority level 6 and starts processing the request. When IFF = 7, Micro DMA request cannot be accepted. The 8 micro DMA channels allow micro DMA processing to be set for up to 8 types of interrupt at once. When micro DMA is accepted, the interrupt request flip-flop assigned to that channel is cleared. Data in one-byte, two-byte or four-byte blocks is automatically transferred at once from the transfer source address to the transfer destination address set in the control register, and the transfer counter is decremented by "1". If the value of the counter after it has been decremented is not "0", DMA processing ends with no change in the value of the micro DMA start vector register. If the value of the decremented counter is "0", a micro DMA transfer end interrupt (INTTC0 to INTTC7) is sent from the CPU to the interrupt controller. In addition, the micro DMA /HDMA start vector register is cleared to "0", the next micro DMA operation is disabled and micro DMA processing terminates. If an interrupt request is triggered for the interrupt source in use during the interval between the time at which the micro DMA /HDMA start vector is cleared and the next setting, general-purpose interrupt processing is performed at the interrupt level set. Therefore, if the interrupt is only being used to initiate micro DMA /HDMA (and not as a general-purpose interrupt), the interrupt level should first be set to 0 (i.e, interrupt requests should be disabled). If micro DMA and general-purpose interrupts are being used together as described above, the level of the interrupt which is being used to initiate micro DMA processing should first be set to a lower value than all the other interrupt levels. In this case, edge-triggered interrupts are the only kinds of general interrupts which can be accepted.
92CF26A-72
2007-11-21
TMP92CF26A
If micro DMA requests are set simultaneously for more than one channel, priority is not based on the interrupt priority level but on the channel number: The lower the channel number, the higher the priority (Channel 0 thus has the highest priority and channel 7 the lowest).
Note: Don't start any micro DMAs by one interrupt. If any micro DMA are set by it, micro DMA that channel number is biggest (priority is lowest) is not started.(Because interrupt flag is cleared by micro DMA that priority is highest)
Although the control registers used for setting the transfer source and transfer destination addresses are 32 bits wide, this type of register can only output 24-bit addresses. Accordingly, micro DMA can only access 16 Mbytes (The upper 8 bits of a 32-bit address are not valid). Three micro DMA transfer modes are supported: 1byte transfer, 2byte (One word) transfers and 4byte transfers. After a transfer in any mode, the transfer source and transfer destination addresses will either be incremented or decremented, or will remain unchanged. This simplifies the transfer of data from memory to memory, from I/O to memory, from memory to I/O, and from I/O to I/O. For details of the various transfer modes, see section 3.5.2 (4) "Detailed description of the transfer mode register". Since a transfer counter is a 16-bit counter, up to 65536 micro DMA processing operations can be performed per interrupt source (Provided that the transfer counter for the source is initially set to 0000H). Micro DMA processing can be initiated by any one of 48 different interrupts - the 47 interrupts shown in the micro DMA start vectors in Table 3.5.1 and a micro DMA soft start. Figure 3.5.2 shows a 2-byte transfer carried out using a micro DMA cycle in Transfer Destination Address INC Mode (micro DMA transfers are the same in every mode except Counter Mode). (The conditions for this cycle are as follows: both source and destination memory are internal-RAM and multiple of 4 numbered source and destination addresses).
1 state
(1) fSYS A23 to A0
(2)
(3)
(4)
(5)
src
dst
Note: In fact, src and dst address are not outputted to A23-A0 pins because they are internal RAM address.
Figure 3.5.2 Timing for micro DMA cycle States (1) and (2): Instruction fetch cycle (Prefetches the next instruction code) State (3): Micro DMA read cycle. State (4): Micro DMA writes cycle. State (5): (The same as in state (1), (2).)
92CF26A-73
2007-11-21
TMP92CF26A
(2) Soft start function The TMP92CF26A can initiate micro DMA/HDMA either with an interrupt or by using the micro DMA /HDMA soft start function, in which micro DMA or HDMA is initiated by a Write cycle which writes to the register DMAR. Writing "1" to each bit of DMAR register causes micro DMA or HDMA to be performed once. On completion of the transfer, the bits of DMAR for the completed channel are automatically cleared to "0". When writing again "1" to it, soft start can execute continuously until the DMA transfer counter (DMACn) or HDMA transfer counter B (HDMACBn) become "0". When a burst is specified by the register DMAB, data is transferred continuously from the initiation of micro DMA until the value in the micro DMA transfer counter is "0".
Note1: If it is started by software, don't set any channels to start in same time. Note2: If be started sequentially, restart it after confirming micro DMA of all channels is completed (all micro DMA are set to "0").
Symbol
Name
DMA Request
Address
109H (Prohibit RMW)
7
DREQ7
6
DREQ6 0
5
DREQ5 0
4
DREQ4 0 R/W
3
DREQ3 0 1: Start DMA
2
DREQ2 0
1
DREQ1 0
0
DREQ0 0
DMAR
0
(3) Transfer control registers The transfer source address and the transfer destination address are set in the following registers. An instruction of the form LDC cr,r can be used to set these registers.
Channel 0 DMAS0 DMAD0 DMAC0 DMAM0 Micro DMA source address register 0 Micro DMA destination address register 0 Micro DMA counter register 0 Micro DMA mode register 0
Channel 7 DMAS7 DMAD7 DMAC7 DMAM7 8 bits 16 bits 32 bits Micro DMA source address register 7 Micro DMA destination address register 7 Micro DMA counter register 7 Micro DMA mode register 7
92CF26A-74
2007-11-21
TMP92CF26A
(4) Detailed description of the transfer mode register 0 0 0 Mode
DMAM0 to DMAM7
DMAMn[4:0]
000zz Destination INC mode (DMADn +) (DMASn) DMACn 001zz
Mode Description
Execution Time
DMACn - 1
5 states
if DMACn = 0 then INTTCn Destination DEC mode (DMADn -) (DMASn) DMACn 010zz DMACn - 1 if DMACn = 0 then INTTCn Source INC mode (DMADn) DMACn 011zz (DMASn +) DMACn - 1 5 states 5 states
if DMACn = 0 then INTTCn Source DEC mode (DMADn) DMACn 100zz (DMASn -) DMACn - 1 5 states
if DMACn = 0 then INTTCn Source and destination INC mode (DMADn +) (DMASn +) DMACn 101zz DMACn - 1 If DMACn = 0 then INTTCn Source and destination DEC mode (DMADn -) (DMASn -) DMACn 110zz DMACn - 1 If DMACn = 0 then INTTCn Destination and fixed mode (DMADn) (DMASn) DMACn 1 1 1 00 DMACn - 1 If DMACn = 0 then INTTCn Counter mode DMASn DMACn DMASn + 1 DMACn - 1 5 states 5 states 6 states 6 states
If DMACn = 0 then INTTCn
ZZ:
00 = 1-byte transfer 01 = 2-byte transfer 10 = 4-byte transfer 11 = Reserved
Note 1: n stands for the micro DMA channel number (0 to 7). DMADn+/DMASn+: Post increment (Register value is incremented after transfer). DMADn-/DMASn-: Post decrement (Register value is decremented after transfer). "I/O" signifies fixed memory addresses; "memory" signifies incremented or decremented memory addresses. Note 2: The transfer mode register should not be set to any value other than those listed above. Note 3: The execution state number shows number of best case (1-state memory access).
92CF26A-75
2007-11-21
TMP92CF26A 3.5.2 Interrupt Controller Operation
The block diagram in Figure 3.5.3 shows the interrupt circuits. The left-hand side of the diagram shows the interrupt controller circuit. The right-hand side shows the CPU interrupt request signal circuit and the halt release circuit. For each of the 59 interrupts channels there is an interrupt request flag (consisting of a flip-flop), an interrupt priority setting register and a micro DMA /HDMA start vector register. The interrupt request flag latches interrupt requests from the peripherals. The flag is cleared to "0" in the following cases: when a reset occurs, when the CPU reads the channel vector of an interrupt it has received, when the CPU receives a micro DMA request (when micro DMA is set), when the CPU receives a HDMA request (when HDMA is set), when a micro DMA burst transfer is terminated, and when an instruction that clears the interrupt for that channel is executed (by writing a micro DMA start vector to the INTCLR register). An interrupt priority can be set independently for each interrupt source by writing the priority to the interrupt priority setting register (e.g., INTE0 or INTE12). Six interrupt priorities levels (1 to 6) are provided. Setting an interrupt source's priority level to 0 (or 7) disables interrupt requests from that source. If more than one interrupt request with a given priority level are generated simultaneously, the default priority (The interrupt with the lowest priority or, in other words, the interrupt with the lowest vector value) is used to determine which interrupt request is accepted first. The 3rd and 7th bits of the interrupt priority setting register indicate the state of the interrupt request flag and thus whether an interrupt request for a given channel has occurred. If several interrupts are generated simultaneously, the interrupt controller sends the interrupt request for the interrupt with the highest priority and the interrupt's vector address to the CPU. The CPU compares the mask value set in of the status register (SR) with the priority level of the requested interrupt; if the latter is higher, the interrupt is accepted. Then the CPU sets SR to the priority level of the accepted interrupt + 1. Hence, during processing of the accepted interrupt, new interrupt requests with a priority value equal to or higher than the value set in SR (e.g., interrupts with a priority higher than the interrupt being processed) will be accepted. When interrupt processing has been completed (e.g., after execution of a RETI instruction), the CPU restores to SR the priority value which was saved on the stack before the interrupt was generated. The interrupt controller also includes eight registers which are used to store the micro DMA /HDMA start vector. Writing the start vector of the interrupt source for the micro DMA or /HDMA processing (See Table), enables the corresponding interrupt to be processed by micro DMA or HDMA processing. The values must be set in the micro DMA parameter registers (e.g., DMAS and DMAD) or HDMA parameter registers (e.g., HDMAS, and HDMAD) prior to micro DMA or HDMA processing.
92CF26A-76
2007-11-21
Interrupt controller Interrupt request F/F Q Interrupt mask F/F RESET Priority encorderInterrupt request
signal to CPU
CPU 1
INTWD
S RESET R Interrupt vector read
V = 20H V = 24H
Priority setting register IFF2 to 0 3 3 INTRQ2 to 0 3 Interrupt mask detect
A B
Decorder 1 7 6 6
Dn
EI 1 to 7 DI Interrupt request signal
During IDLE1 During STOP
Dn + 1
Dn + 2 C
D Q CLR Interrupt request F/F Q Interrupt request F/F 52
Interrupt vector generator
Y1 Y2 Y3 Y4 Y5 Y6
INT0
Dn + 3 D0 D1
Reset
S R Interrupt vector read Micro DMA acknowledge
1 2 Highest A priority 3 interrupt B C 4 level select 5 6 7 INTRQ20 IFF 20 then 1.
INT1 INT2 INT3 INT4 INTALM INTTA4 INTTA5
V = 28H V = 2CH V = 30H V = 34H V = 38H V = 3CH V = 40H V = 44H
D2 D3 D4 D5 D6 D7 RESET
Figure 3.5.3 Block Diagram of Interrupt Controller
92CF26A-77
Interrupt vector read 8 input OR 8
V = E0H V = E4H V = E8H V = ECH
HALT release
Micro DMA/HDMA counter 0 interrupt
INTTC4/INTDMA4 INTTC5/INTDMA5 INTTC6 INTTC7
INT0,1 to 4,INTKEY, INTRTC INTALM
Micro DMA request
Micro DMA/HDMA start vector setting register
IFF7 then 0 Soft start
0 1 2 7
3
3
51 S
Selector
D5 D4 D3 D2 D1 D0
D Q CLR 6
INTTC0/ INTDMA0
A B C Micro DMA channel priority encorder 6 input OR 6
Micro DMA channel specification
HDMA
RESET
HDMA request
DMA0V DMA1V DMA2V DMA3V DMA4V DMA5V DMA6V DMA7V
0 1 2 5
A B C 6 HDMA channel priority encorder
3
3
HDMA channel
TMP92CF26A
2007-11-21
Micro DMA/HDMA selection register
TMP92CF26A
(1) Interrupt priority setting registers Name
INT0 enable
Symbol
Address
7
- -
6
- -
5
- -
4
-
3
I0C R 0
2
INT0 I0M2 0 INT1 I1M2 0 INT3 I3M2 0 INT5 I5M2 0 INT7 I7M2 0 ITA0M2 0 ITA2M2 0 ITA4M2 0 ITA6M2 0
1
I0M1 R/W 0 I1M1 R/W 0 I3M1 R/W 0 I5M1 R/W 0 I7M1 R/W 0 ITA0M1 R/W 0 ITA2M1 R/W 0 ITA4M1 R/W 0 ITA6M1 R/W 0
0
I0M0 0 I1M0 0 I3M0 0 I5M0 0 I7M0 0 ITA0M0 0 ITA2M0 0 ITA4M0 0 ITA6M0 0
INTE0
F0H
Always write "0". INT2 INTE12 INT1 & INT2 enable D0H I2C R 0 INT3 & INT4 enable I4C R 0 INT5 & INT6 enable I6C R 0 INT7 enable - - 0 - INTE7 D3H - - - Always write "0". INTTA1 (TMRA1) INTETA01 INTTA0 & INTTA1 enable D4H ITA1C R 0 INTTA2 & INTTA3 enable ITA3C R 0 INTTA4 & INTTA5 enable ITA5C R 0 INTTA6 & INTTA7 enable ITA7C R 0 0 0 ITA7M2 0 ITA5M2 0 ITA3M2 ITA1M2 ITA1M1 R/W 0 ITA3M1 R/W 0 ITA5M1 R/W 0 ITA7M1 R/W 0 0 0 ITA7M0 INTTA7 (TMRA7) INTETA67 D7H 0 ITA5M0 INTTA5 (TMRA5) INTETA45 D6H 0 ITA3M0 INTTA3 (TMRA3) INTETA23 D5H ITA1M0 - 0 INT6 INTE56 D2H I6M2 I6M1 R/W 0 0 I6M0 0 INT4 INTE34 D1H I4M2 I4M1 R/W 0 0 I4M0 I2M2 I2M1 R/W 0 0 I2M0
I1C R 0 I3C R 0 I5C R 0 I7C R 0 ITA0C R 0 ITA2C R 0 ITA4C R 0 ITA6C R 0
INTTA0 (TMRA0)
INTTA2 (TMRA2)
INTTA4 (TMRA4)
INTTA6 (TMRA6)
lxxM2
0 0 0 0 1 1 1 1
lxxM1
0 0 1 1 0 0 1 1
lxxM0
0 1 0 1 0 1 0 1
Function (Write)
Disables interrupt requests Sets interrupt priority level to 1 Sets interrupt priority level to 2 Sets interrupt priority level to 3 Sets interrupt priority level to 4 Sets interrupt priority level to 5 Sets interrupt priority level to 6 Disables interrupt requests
Interrupt request flag
92CF26A-78
2007-11-21
TMP92CF26A
Symbol
Name
INTTB00 &
Address
7
ITB01C R 0
6
ITB01M2 0 ITB11M2 0 INTTX0 ITX0M2 0 INTADM IADMM2 0 ISPITM2 0 - -
5
ITB01M1 R/W 0 ITB11M1 R/W 0 ITX0M1 R/W 0 IADMM1 R/W 0
4
ITB01M0 0 ITB11M0 0 ITX0M0 0 IADMM0 0 ISPITM0 0 -
3
ITB00C R 0 ITB10C R 0 IRX0C R 0 ISBI0C R 0 ISPIRC R 0 IUSBC R 0
2
1
0
ITB00M0 0 ITB10M0 0 IRX0M0 0 ISBIM0 0 ISPIRM0 0 IUSBM0 0 IALMM0 0 IRM0 0 IKM0 0
INTTB01 (TMRB0) D8H
INTTB00 (TMRB0) ITB00M2 ITB00M1 R/W 0 0 INTTB10 (TMRB1) ITB10M2 ITB10M1 R/W 0 INTRX0 IRX0M2 0 INTSBI ISBIM2 0 ISPIRM2 0 INTUSB IUSBM2 0 INTALM IALMM2 0 INTRTC IRM2 0 INTKEY IKM2 0 ISBIM1 R/W 0 INTSPIRX ISPIRM1 R/W 0 IUSBM1 R/W 0 IALMM1 R/W 0 IRM1 R/W 0 IKM1 R/W 0 IRX0M1 R/W 0 0
INTETB0
INTTB01 enable
INTTB10 & INTETB1 INTTB11 enable D9H
INTTB11 (TMRB1) ITB11C R 0
INTRX0 & INTES0 INTTX0 enable DBH
ITX0C R 0
INTSBI & INTESBIADM INTADM enable E0H
IADM0C R 0
INTSPITX INTESPI INTSPI enable E1H ISPITC R 0 INTUSB enable - - - INTEALM INTALM enable E5H - - - INTERTC INTRTC enable E8H - - - INTEKEY INTKEY enable E9H - - - - - Always write "0". - IKC R 0 - - - Always write "0". - IRC R 0 - - - Always write "0". - IALMC R 0 ISPITM1 R/W 0 - - Always write "0".
INTEUSB
E3H
lxxM2
0 0 0
lxxM1
0 0 1 1 0 0 1 1
lxxM0
0 1 0 1 0 1 0 1
Function (Write)
Disables interrupt requests Sets interrupt priority level to 1 Sets interrupt priority level to 2 Sets interrupt priority level to 3 Sets interrupt priority level to 4 Sets interrupt priority level to 5 Sets interrupt priority level to 6 Disables interrupt requests
Interrupt request flag
0 1 1 1 1
92CF26A-79
2007-11-21
TMP92CF26A
Symbol
Name
INTLCD enable
Address
7
- -
6
- -
5
- -
4
-
3
ILCD1C R 0
2
INTLCD ILCDM2 0 INTI2S0 II2S0M2 0 INTRDY IRDYM2 0 INTP0 IP0M2 0 INTAD IADM2 0
1
ILCDM1 R/W 0 II2S0M1 R/W 0 IRDYM1 R/W 0 IP0M1 R/W 0 IADM1 R/W 0
0
ILCDM0 0 II2S0M0 0 IRDYM0 0 IP0M0
INTELCD
EAH
Always write "0". INTI2S0 & INTEI2S01 INTI2S1 enable EBH INTI2S1 II2S1C R 0 INTRSC & INTENDFC INTRDY enable ECH IRSCC R 0 INTP0 enable - - 0 - INTEP0 EEH - - - Always write "0". INTAD & 0INTEAD INTADHP enable EFH INTADHP IADHPC IADHPM2 IADHPM1 IADHPM0 R 0 0 R/W 0 0 - 0 INTRSC IRSCM2 IRSCM1 R/W 0 0 IRSCM0 II2S1M2 II2S1M1 R/W 0 0 II2S1M0
I I2S0C R/W 0 IRDYC R 0 IP0C R 0 IADC R/W 0
IADM0 0
lxxM2
0 0 0 0 1 1 1 1
lxxM1
0 0 1 1 0 0 1 1
lxxM0
0 1 0 1 0 1 0 1
Function (Write)
Disables interrupt requests Sets interrupt priority level to 1 Sets interrupt priority level to 2 Sets interrupt priority level to 3 Sets interrupt priority level to 4 Sets interrupt priority level to 5 Sets interrupt priority level to 6 Disables interrupt requests
Interrupt request flag
92CF26A-80
2007-11-21
TMP92CF26A
Symbol
Name
INTTC0/INTDMA0 & INTTC1/INTDMA1 enable
Address
7
ITC1C
6
ITC1M2
5
ITC1M1 R/W
4
ITC1M0
3
ITC0C R
2
ITC0M2
1
ITC0M1 R/W
0
ITC0M0
INTTC1/INTDMA1 INTETC01 /INTEDMA01 F1H
INTTC0/INTDMA0
/IDMA1C /IDMA1M2 /IDMA1M1 /IDMA1M0 /IDMA0C /IDMA0M2 /IDMA0M1 /IDMA0M0 R 0 0 ITC3M2 0 ITC3M1 R/W 0 ITC5M2 0 ITC5M1 R/W 0 ITC7M2 0 - - 0 ITC7M1 R/W 0 - - Always write "0". 0 - 0 ITC7M0 INTTC7 (DMA7) 0 ITC5M0 INTTC5/INTDMA5 0 ITC3M0 0 ITC2C R 0 ITC4C R 0 ITC6C R 0 ITCWD R 0 - - - 0 INTWD - - - 0 ITC6M2 0 ITC4M2 0 ITC2M2 0 ITC2M1 R/W 0 ITC4M1 R/W 0 ITC6M1 R/W 0 0 0 ITC6M0 INTTC6 (DMA6) 0 ITC4M0 INTTC4/INTDMA4 0 ITC2M0
INTTC3/INTDMA3 INTETC23 /INTEDMA23 INTTC2/INTDMA2 & INTTC3/INTDMA3 enable F2H ITC3C R 0 INTTC4/INTDMA4 & INTTC5/INTDMA5 enable F3H ITC5C R 0 INTTC6 & INTTC7 enable ITC7C R 0 INTWD enable - -
INTTC2/INTDMA2
/IDMA3C /IDMA3M2 /IDMA3M1 /IDMA3M0 /IDMA2C /IDMA2M2 /IDMA2M1 /IDMA2M0
INTETC45 /INTEDMA45
/IDMA5C /IDMA5M2 /IDMA5M1 /IDMA5M0 /IDMA4C /IDMA4M2 /IDMA4M1 /IDMA4M0
INTETC67
F4H
INTWDT
F7H
lxxM2 0 0 0 0 1 1 1 1
lxxM1 0 0 1 1 0 0 1 1
lxxM0 0 1 0 1 0 1 0 1
Function (Write) Disables interrupt requests Sets interrupt priority level to 1 Sets interrupt priority level to 2 Sets interrupt priority level to 3 Sets interrupt priority level to 4 Sets interrupt priority level to 5 Sets interrupt priority level to 6 Disables interrupt requests
Interrupt request flag
92CF26A-81
2007-11-21
TMP92CF26A
(1) External interrupt control Symbol Name Address 7
I5EDGE 0 0: Rising 1: Falling
6
I4EDGE 0 0: Rising 1: Falling
5
I3EDGE W 0 0: Rising 1: Falling
4
I2EDGE 0 0: Rising 1: Falling
3
I1EDGE 0 0: Rising 1: Falling
2
I0EDGE 0 0: Rising 1: Falling
1
I0LE R/W 0 0:Edge mode 1: Level mode I7EDGE
0
- 0 Always write "0".
Interrupt IIMC0 input mode control 0
F6H (Prohibit RMW)
INT5EDGE INT4EDGE INT3EDGE INT2EDGE INT1EDGE INT0EDGE INT0
I6EDGE W 0 0: Rising 1: Falling
Interrupt IIMC1 input mode control 0
FAH (Prohibit RMW) 0 0: Rising 1: Falling
INT7EDGE INT6EDGE
Note 1: Disable INT0 request before changing INT0 pin mode from level sense to edge sense. (change from "1" to "0") DI LD LD
(IIMC0), XXXXXX0-B (INTCLR), 0AH
; Switches from level to edge. ; Clears interrupt request flag. ; Wait EI execution
NOP NOP NOP EI X: Don't care, -: No change
Note 2: See electrical characteristics in section 4 for external interrupt input pulse width. Note 3: In port setting, if 16 bit timer input is selected and capture control is executed, INT6 and INT7 don't depend on IIMC1 register setting. INT6 and INT7 operate by setting TBnMOD.
Settings of External Interrupt Pin Function Interrupt
INT0
Pin Name
PC0
Mode
Rising edge Falling edge High level Rising edge Falling edge Rising edge Falling edge Rising edge Falling edge Rising edge Falling edge Rising edge Falling edge Rising edge Falling edge Rising edge Falling edge
Setting Method
= 0, = 0 = 0, = 1 = 1 = 0 = 0 = 0 = 1 = 0 = 1 = 0 = 1 = 0 = 1 = 0 = 1 = 0 = 1
INT1 INT2 INT3 INT4 INT5 INT6 INT7
PC1 PC2 PC3 P96 PP3 PP4 PP5
92CF26A-82
2007-11-21
TMP92CF26A
(2) SIO receive interrupt control Symbol Name Address 7
- W SIO SIMC interrupt mode control 0 F5H (Prohibit RMW) Always write "0" (Note) 0 Always write "0"
6
-
5
4
3
2
1
0
IR0LE W 1 0:INTRX0 edge mode 1:INTRX0 level mode
Note: When using the micro DMA transfer end interrupt, always write "1".
INTRX0 edge enable
0 1 Edge detect INTRX0 "H" level INTRX0
92CF26A-83
2007-11-21
TMP92CF26A
(3) Interrupt request flag clear register The interrupt request flag is cleared by writing the appropriate micro DMA /HDMA start vector, as given in Table 3.5.1 to the register INTCLR. For example, to clear the interrupt flag INT0, perform the following register operation after execution of the DI instruction.
INTCLR 0AH ; Clears interrupt request flag INT0.
Symbol
Name
Interrupt clear control
Address
F8H (Prohibit RMW)
7
CLRV7 0
6
CLRV6 0
5
CLRV5 0
4
CLRV4 W 0
3
CLRV3 0
2
CLRV2 0
1
CLRV1 0
0
CLRV0 0
INTCLR
Interrupt vector
(4) Micro DMA start vector registers These registers assign micro DMA /HDMA processing to sets which source corresponds to DMA. The interrupt source whose micro DMA /HDMA start vector value matches the vector set in one of these registers is designated as the micro DMA /HDMA start source. When the micro DMA transfer counter (DMACn) or HDMA transfer counter B (HDMACBn) value reaches "0", the micro DMA /HDMA transfer end interrupt corresponding to the channel is sent to the interrupt controller, the micro DMA /HDMA start vector register is cleared, and the micro DMA /HDMA start source for the channel is cleared. Therefore, in order for micro DMA /HDMA processing to continue, the micro DMA /HDMA start vector register must be set again during processing of the micro DMA /HDMA transfer end interrupt. If the same vector is set in the micro DMA /HDMA start vector registers of more than one channel, the lowest numbered channel takes priority. Accordingly, if the same vector is set in the micro DMA /HDMA start vector registers for two different channels, the interrupt generated on the lower-numbered channel is executed until micro DMA /HDMA transfer is complete. If the micro DMA /HDMA start vector for this channel has not been set in the channel's micro DMA /HDMA start vector register again, micro DMA /HDMA transfer for the higher-numbered channel will be commenced. (This process is known as micro DMA /HDMA chaining.)
92CF26A-84
2007-11-21
TMP92CF26A
Symbol
Name
DMA0
Address
7
6
5
DMA0V5
4
DMA0V4 0 DMA1V4 0 DMA2V4 0 DMA3V4 0 DMA4V4 0 DMA5V4 0 DMA6V4 0 DMA7V4 0
3
DMA0V3 R/W 0 DMA1V3 R/W 0 DMA2V3 R/W 0 DMA3V3 R/W 0 DMA4V3 R/W 0 DMA5V3 R/W 0 DMA6V3 R/W 0 DMA7V3 R/W 0
2
DMA0V2 0 DMA1V2 0 DMA2V2 0 DMA3V2 0 DMA4V2 0 DMA5V2 0 DMA6V2 0 DMA7V2 0
1
DMA0V1 0 DMA1V1 0 DMA2V1 0 DMA3V1 0 DMA4V1 0 DMA5V1 0 DMA6V1 0 DMA7V1 0
0
DMA0V0 0 DMA1V0 0 DMA2V0 0 DMA3V0 0 DMA4V0 0 DMA5V0 0 DMA6V0 0 DMA7V0 0
DMA0V
start vector
100H
0 DMA1V5
DMA0 start vector DMA1 DMA1V start vector 101H
0 DMA2V5
DMA1 start vector DMA2 DMA2V start vector 102H
0 DMA3V5
DMA2 start vector DMA3 DMA3V start vector 103H
0 DMA4V5
DMA3 start vector DMA4 DMA4V start vector 104H 0 DMA5V5 DMA5 DMA5V start vector 105H 0 DMA6V5 DMA6 DMA6V start vector 106H 0 DMA7V5 DMA7 DMA7V start vector 107H 0
DMA4 start vector
DMA5 start vector
DMA6 start vector
DMA7 start vector
(5) Micro DMA/HDMA select register This register selectable that is started either Micro DMA or HDMA processing. Micro DMA /HDMA start vector register (DMAnV) shared with both functions. When interrupt which match with vector value that is set to DMA/HDMA start vector register generated, use this register. Symbol NAME
Micro DMASEL DMA/ HDMA select 10AH 0 0:Micro DMA5 0 0:Micro DMA4 0 0:Micro DMA3 1:HDMA3
Address
7
6
5
4
3
R/W
2
1
0
DMASEL5 DMASEL4
DMASEL3 DMASEL2 DMASEL1 DMASEL0 0 0:Micro DMA2 1:HDMA2 0 0:Micro DMA1 1:HDMA1 0 0:Micro DMA0 1:HDMA0
1:HDMA5 1:HDMA4
92CF26A-85
2007-11-21
TMP92CF26A
(6) Specification of a micro DMA burst Specifying the micro DMA burst function causes micro DMA transfer, once started, to continue until the value in the transfer counter register reaches "0". Setting any of the bits in the register DMAB which correspond to a micro DMA channel (as shown below) to "1" specifies that any micro DMA transfer on that channel will be a burst transfer. Symbol Name Address 7
DBST7 DMAB DMA burst 108H 0
6
DBST6 0
5
DBST5 0
4
DBST4 R/W 0
3
DBST3 0
2
DBST2 0
1
DBST1 0
0
DBST0 0
1: DMA request on Burst mode
92CF26A-86
2007-11-21
TMP92CF26A
(7) Notes The instruction execution unit and the bus interface unit in this CPU operate independently. Therefore, if immediately before an interrupt is generated, the CPU fetches an instruction which clears the corresponding interrupt request flag, the CPU may execute this instruction in between accepting the interrupt and reading the interrupt vector. In this case, the CPU will read the default vector 0004H and jump to interrupt vector address FFFF04H. To avoid this, an instruction which clears an interrupt request flag should always be preceded by a DI instruction. And in the case of setting an interrupt enable again by EI instruction after the execution of clearing instruction, execute EI instruction after clearing and more than 3-instructions (e.g., "NOP" x 3 times). If placed EI instruction without waiting NOP instruction after execution of clearing instruction, interrupt will be enable before request flag is cleared. In the case of changing the value of the interrupt mask register by execution of POP SR instruction, disable an interrupt by DI instruction before execution of POP SR instruction. In addition, please note that the following two circuits are exceptional and demand special attention.
In level mode INT0 is not an edge-triggered interrupt. Hence, in level mode the interrupt request flip-flop for INT0 does not function. The peripheral interrupt request passes through the S input of the flip-flop and becomes the Q output. If the interrupt input mode is changed from edge mode to level mode, the interrupt request flag is cleared automatically. If the CPU enters the interrupt response sequence as a result of INT0 going from 0 to 1, INT0 must then be held at 1 until the interrupt response sequence has been completed. If INT0 is set to level mode so as to release a halt state, INT0 must be held at 1 from the time INT0 changes from 0 to 1 until the halt state is released. (Hence, it is necessary to ensure that input noise is not interpreted as a 0, causing INT0 to revert to 0 before the halt state has been released.) INT0 level mode When the mode changes from level mode to edge mode, interrupt request flags which were set in level mode will not be cleared. Interrupt request flags must be cleared using the following sequence. DI LD (IIMC0), 00H LD (INTCLR), 0AH NOP NOP NOP EI In level mode (The register SIMC set to "1"), the interrupt request flip-flop can only be cleared INTRX by a reset or by reading the serial channel receive buffer. It cannot be cleared by writing INTCLR register. Note: The following instructions or pin input state changes are equivalent to instructions which clear the interrupt request flag. INT0: Instructions which switch to level mode after an interrupt request has been generated in edge mode. The pin input changes from high to low after an interrupt request has been generated in level mode. ("H" "L") INTRX: Instructions which read the receive buffer. ; Switches from level to edge. ; Clears interrupt request flag. ; Wait EI execution
92CF26A-87
2007-11-21
TMP92CF26A
3.6
DMAC (DMA Controller)
The TMP92CF26A incorporates a DMA controller (DMAC) having six channels. This DMAC can realize data transfer faster than the micro DMA function by the 900/H1 CPU. The DMAC has the following features: 1) Six independent channels of DMA 2) Two types of transfer start requests Hardware request (using an interrupt source connected with the INTC) or software request can be selected for each channel. 3) Various source/destination combinations The combination of transfer source and destination can be selected for each channel from the following four types: memory to memory, memory to I/O, I/O to memory, I/O to I/O. 4) Transfer address mode Only the dual address mode is supported. 5) Dual-count mechanism and DMA end interrupt Two count registers are provided to execute multiple DMA transfers by one DMA request and to generate multiple DMA requests at a time. The DMA end interrupt (INTDMA0 to INTDMA5) is also provided so that a general-purpose interrupt routine can be used to prepare for the next processing. 6) Priorities among DMA channels (the same as the micro DMA acceptance specifications of the INTC) DMA requests are basically accepted in the order in which they are asserted. If more than one request is asserted simultaneously or it looks as if two requests were asserted simultaneously because one of the requests has been put on hold while other processing was being performed, the smaller-numbered channel is given a higher priority. 7) DMAC bus occupancy limiting function The DMAC incorporates a special timer for limiting its bus occupancy time to avoid excessive interference with the CPU or LCDC operation. 8) The DMAC can be used in HALT (IDLE2) mode.
92CF26A-88
2007-11-21
TMP92CF26A 3.6.1 Block Diagram
Figure 3.6.1 shows an overall block diagram for the DMAC.
Bus Multiplexer Address Bus
SDRAM Controller
LCD Controller
State
Address Bus Data Bus State Address Bus Bus REQ Bus ACK Data Bus State Source Memory, I/O
Bus ACK INTC (Interrupt Controller) Bus REQ
CPU
Interrupt REQ DMAnV 7 0 DMASn 31 DMAC or micro DMA request source setting DMAR DMAC or micro DMA soft start setting DMAB Micro DMA burst setting DMASEL DMAC or micro DMA select setting Bus REQ Micro DMA ACK, INTTCn Micro DMA REQ, Micro DMA Channel
0 Destination Memory, I/O Address Bus Address Bus Data Bus State
Micro DMA source address setting
DMADn Data Bus Micro DMA destination address setting State 15 0 DMACn Micro DMA transfer count setting 7 0 DMAMn Micro DMA mode setting
DMA REQ, DMA Channel DMA ACK, INTDMAn
DMAC
HDMASn
31 DMA source address setting HDMADn
Bus ACK
0
Address Bus State Data Bus
DMA destination address setting 0 15 HDMACAn DMA transfer count A setting HDMACBn DMA transfer count B setting HDMAMn DMA mode setting HDMAE DMA operation enable/disable HDMATR DMA maximum bus occupancy time setting, mode setting 7 0
Note: "n" denotes a channel number. Micro DMA has eight channels (0 to 7) and DMA has six channels (0 to 5).
Figure 3.6.1 Overall Block Diagram
92CF26A-89
2007-11-21
TMP92CF26A 3.6.2 SFRs
The DMAC has the following SFRs. These registers are connected to the CPU via a 16-bit data bus. (1) HDMASn (DMA Transfer Source Address Setting Register) The HDMASn register is used to set the DMA transfer source address. When the source address is updated by DMA execution, HDMASn is also updated. HDMAS0 to HDMAS5 have the same configuration. Although the bus sizing function is supported, the address alignment function is not supported. Therefore, specify an even-numbered address for transferring 2 bytes and an address that is an integral multiple of 4 for transferring 4 bytes. HDMASn Register 7
HDMASn bit Symbol Read/Write Reset State Function 0 0 0 0 DnSA7
6
DnSA6
5
DnSA5
4
DnSA4 R/W
3
DnSA3 0
2
DnSA2 0
1
DnSA1 0
0
DnSA0 0
Source address [7:0] for DMAn
15
bit Symbol Read/Write Reset State Function 0 DnSA15
14
DnSA14 0
13
DnSA13 0
12
DnSA12 0 R/W
11
DnSA11 0
10
DnSA10 0
9
DnSA9 0
8
DnSA8 0
Source address [15:8] for DMAn
23
bit Symbol Read/Write Reset State Function 0 DnSA23
22
DnSA22 0
21
DnSA21 0
20
DnSA20 0 R/W
19
DnSA19 0
18
DnSA18 0
17
DnSA17 0
16
DnSA16 0
Source address [23:16] for DMAn
Source address [23:16]
Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 Channel 5 (0902H) (0912H) (0922H) (0932H) (0942H) (0952H)
Source address [15:8]
(0901H) (0911H) (0921H) (0931H) (0941H) (0951H)
Source address [7:0]
HDMAS0 (0900H) HDMAS1 (0910H) HDMAS2 (0920H) HDMAS3 (0930H) HDMAS4 (0940H) HDMAS5 (0950H)
Note: Read-modify-write instructions can be used on all these registers.
Figure3.6.2 HDMASn Register
92CF26A-90
2007-11-21
TMP92CF26A
(2) HDMADn (DMA Transfer Destination Address Setting Register) The HDMADn register is used to set the DMA transfer destination address. When the destination address is updated by DMA execution, HDMADn is also updated. HDMAD0 to HDMAD5 have the same configuration. Although the bus sizing function is supported, the address alignment function is not supported. Therefore, specify an even-numbered address for transferring 2 bytes and an address that is an integral multiple of 4 for transferring 4 bytes. HDMADn Register 7
HDMADn bit Symbol Read/Write Reset State Function 0 0 0 0 DnDA7
6
DnDA6
5
DnDA5
4
DnDA4 R/W
3
DnDA3 0
2
DnDA2 0
1
DnDA1 0
0
DnDA0 0
Destination address [7:0] for DMAn
15
bit Symbol Read/Write Reset State Function 0 DnDA15
14
DnDA14 0
13
DnDA13 0
12
DnDA12 R/W 0
11
DnDA11 0
10
DnDA10 0
9
DnDA9 0
8
DnDA8 0
Destination address [15:8] for DMAn
23
bit Symbol Read/Write Reset State Function 0 DnDA23
22
DnDA22 0
21
DnDA21 0
20
DnDA20 R/W 0
19
DnDA19 0
18
DnDA18 0
17
DnDA17 0
16
DnDA16 0
Destination address [23:16] for DMAn
Destination address [23:16]
Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 Channel 5 (0906H) (0916H) (0926H) (0936H) (0946H) (0956H)
Destination address [15:8]
(0905H) (0915H) (0925H)
Destination address [7:0]
HDMAD0 (0904H) HDMAD1 (0914H) HDMAD2 (0924H) HDMAD3 (0934H) HDMAD4 (0944H) HDMAD5 (0954H)
(0935H) (0945H) (0955H)
Note: Read-modify-write instructions can be used on all these registers.
Figure3.6.3 HDMADn Register
92CF26A-91
2007-11-21
TMP92CF26A
(3) HDMACAn (DMA Transfer Count A Setting Register) The HDMACAn register is used to set the number of times a DMA transfer is to be performed by one DMA request. HDMACAn contains 16 bits and can specify up to 65536 transfers (0001H = one transfer, FFFFH = 65535 transfers, 0000H = 65536 transfers). Even when the transfer count A is updated by DMA execution, HDMACAn is not updated. HDMACA0 to HDMACA5 have the same configuration. HDMACAn Register 7
HDMACAn bit Symbol Read/Write Reset State Function 0 0 0 0 DnCA7
6
DnCA6
5
DnCA5
4
DnCA4 R/W
3
DnCA3 0
2
DnCA2 0
1
DnCA1 0
0
DnCA0 0
Transfer count A [7:0] for DMAn
15
bit Symbol Read/Write Reset State Function 0 DnCA15
14
DnCA14 0
13
DnCA13 0
12
DnCA12 0 R/W
11
DnCA11 0
10
DnCA10 0
9
DnCA9 0
8
DnCA8 0
Transfer count A [15:8] for DMAn
Transfer count A [15:8]
Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 Channel 5 (0909H) (0919H) (0929H) (0939H) (0949H) (0959H)
Transfer count A [7:0]
HDMACA0 (0908H) HDMACA1 (0918H) HDMACA2 (0928H) HDMACA3 (0938H) HDMACA4 (0948H) HDMACA5 (0958H)
Note: Read-modify-write instructions can be used on all these registers.
Figure3.6.4 HDMACAn Register
92CF26A-92
2007-11-21
TMP92CF26A
(4) HDMACBn (DMA Transfer Count B Setting Register) The HDMACBn register is used to set the number of times a DMA request is to be made. HDMACBn contains 16 bits and can specify up to 65536 requests (0001H = one request, FFFFH = 65535 requests, 0000H = 65536 requests). When the transfer count B is updated by DMA execution, HDMACBn is also updated. HDMACB0 to HDMACB5 have the same configuration. HDMACBn Register 7
HDMACBn bit Symbol Read/Write Reset State Function 0 0 0 0 DnCB7
6
DnCB6
5
DnCB5
4
DnCB4 R/W
3
DnCB3 0
2
DnCB2 0
1
DnCB1 0
0
DnCB0 0
Transfer count B [7:0] for DMAn
15
bit Symbol Read/Write Reset State Function 0 DnCB15
14
DnCB14 0
13
DnCB13 0
12
DnCB12 0 R/W
11
DnCB11 0
10
DnCB10 0
9
DnCB9 0
8
DnCB8 0
Transfer count B [15:8] for DMAn
Transfer count B [15:8]
Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 Channel 5 (090BH) (091BH) (092BH) (093BH) (094BH) (095BH)
Transfer count B [7:0]
HDMACB0 (090AH) HDMACB1 (091AH) HDMACB2 (092AH) HDMACB3 (093AH) HDMACB4 (094AH) HDMACB5 (095AH)
Note: Read-modify-write instructions can be used on all these registers.
Figure3.6.5 HDMACBn Register
92CF26A-93
2007-11-21
TMP92CF26A
(5) HDMAMn (DMA Transfer Mode Setting Register) The HDMAMn register is used to set the DMA transfer mode. HDMAM0 to HDMAM5 have the same configuration. HDMAMn Register 5 4 3
DnM4 0 DnM3 0
7
HDMAMn bit Symbol Read/Write Reset State Function
6
2
DnM2 R/W 0
1
DnM1 0 00: 1 byte 01: 2 bytes 10: 4 bytes 11: Reserved
0
DnM0 0
DMA transfer mode 000: Destination INC (I/O MEM) 001: Destination DEC (I/O MEM) 010: Source INC (MEM I/O) 011: Source DEC (MEM I/O) 100: Source/destination INC (MEM MEM) 101: Source/destination DEC (MEM MEM) 110: Source/destination fixed (I/O I/O) 111: Reserved (Note 2)
Transfer data size
Transfer mode [7:0]
Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 Channel 5 HDMAM0 (090CH) HDMAM1 (091CH) HDMAM2 (092CH) HDMAM3 (093CH) HDMAM4 (094CH) HDMAM5 (095CH)
Note 1: Read-modify-write instructions can be used on all these registers. Note 2: INC: Post-increment Dec: Post-decrement I/O: Fixed memory address MEM: Memory address to be incremented or decremented
Figure3.6.6 HDMAMn Register
92CF26A-94
2007-11-21
TMP92CF26A
(6) HDMAE (DMA Operation Enable Register) The HDMAE register is used to enable or disable the DMAC operation. Bits 0 to 5 correspond to channels 0 to 5. Unused channels should be set to "0". HDMAE Register 7
HDMAE (097EH) bit Symbol Read/Write Reset State Function 0 0 0 0: Disable 1: Enable Note: Read-modify-write instructions can be used on this register.
6
5
DMAE5
4
DMAE4
3
DMAE3 R/W
2
DMAE2 0
1
DMAE1 0
0
DMAE0 0
DMA channel operation
Figure3.6.7 HDMAE Register (7) HDMATR (DMA Maximum Bus Occupancy Time Setting Register) The HDMATR register is used to set the maximum duration of time the DMAC can occupy the bus. The TMP92CF26A does not have priority levels for bus arbitration. Therefore, once the DMAC owns the bus, other masters (such as the LCDC) must wait until the DMAC completes its transfer operation and releases the bus. This could lead to problems in the system. For example, if the LCDC cannot own the bus as required, the LCD display function may not work properly. To avoid such a situation, the DMAC limits the duration of its bus occupancy by using this timer register. When the DMAC occupies the bus for the duration of time set in this register, it releases the bus even if the specified DMA operation has not been completed yet. After waiting for 16 states, the DMAC asserts a bus request again to execute the rest of the DMA operation. The DMAC counts the bus occupancy time regardless of which channel is occupying the bus. To set the maximum bus occupancy time, ensure that the HDMAE register is set to "00H" and set HDMATR to "1" and to the desired value.
Note: In case of using S/W start with HDMA, transmission start is to set to "1" DMAR register. However DMAR register can't be used to confirm flag of transmission end. DMAR register reset to "0" when HDMA release bus occupation once with HDMATR function.
HDMATR Register 7
HDMATR (097FH) bit Symbol Read/Write Reset State Function Timer operation 0: Disable 1: Enable 0 0 0 0 DMATE
6
DMATR6
5
DMATR5
4
DMATR4 R/W
3
DMATR3 0
2
DMATR2 0
1
DMATR1 0
0
DMATR0 0
Maximum bus occupancy time setting The value to be set in should be obtained by "maximum bus occupancy time / (256/fSYS)". "00H" cannot be set.
Note: Read-modify-write instructions can be used on this register.
Figure3.6.8 HDMATR Register
92CF26A-95
2007-11-21
TMP92CF26A 3.6.3 DMAC Operation Description
(1) Overall flowchart Figure 3.6.9 shows a flowchart for DMAC operation when an interrupt (DMA) is requested.
Interrupt (DMA) request To general-purpose interrupt or micro DMA processing flow
Interrupt specified by DMA start vector?
No
Yes
Interrupt request F/F clear & bus REQ assert
No
Bus ACK?
Yes
Internal timer start
HDMASn read HDMADn write
Timer match?
Yes
No No
HDMACAn -1=0?
Yes
Bus REQ deassert
Yes
HDMACBn -1=0?
No
INTDMAn assert
END
Figure 3.6.9 Overall Flowchart
92CF26A-96
2007-11-21
TMP92CF26A
(2) Bus arbitration The TMP92CF26A includes three controllers (DMA controller, LCD controller, SDRAM controller) that function as bus masters apart from the CPU. These controllers operate independently and assert a bus request as required. The controller that receives a bus acknowledgement acts as the bus master. No priorities are assigned to these three controllers, and bus requests are processed in the order in which they are asserted. Once one of the controllers owns the bus, bus requests from other controllers are put on hold until the bus is released again. While one of the controllers is occupying the bus, CPU processing including non-maskable interrupt requests is also put on hold. (3) Transfer source and destination memory setting Either internal or external memory can be set as the source and destination memory or I/O to be accessed by the DMAC. Even when the MMU is used in external memory, the addresses to be accessed by the DMAC should be specified using logical addresses. The DMAC accesses the specified source and destination addresses according to the bus width and number of waits set in the memory controller and the bank settings made in the MMU. Although the bus sizing function is supported, the address alignment function is not supported. Therefore, specify an even-numbered address for transferring 2 bytes and an address that is an integral multiple of 4 for transferring 4 bytes. Table 3.6.1 Difference point of address setting between HDMA and micro DMA Data Length
1byte Source address 2byte 4byte 1byte Destination address 2byte 4byte
HDMA
No restriction Even address Address in multiples of 4 No restriction Even address Address in multiples of 4
Micro DMA
No restriction
(4) Operation timing The following diagram shows an example of operation timing for transferring 2 bytes from 16-bit memory connected with the CS2 area to 8-bit memory connected with the CS1 area.
CPU execution cycle DMAC/read DMAC/write CPU execution cycle
SDCLK int_xx busrq busak
CS2
CS1
A23 A0
RD
Undefined after interrupt request is asserted until DMAC read cycle is started
800000H
400000H
400001H
SRWR
SRLUB
SRLLB
D15 D0
1234H
ZZ34H
ZZ12H
92CF26A-97
2007-11-21
TMP92CF26A 3.6.4 Setting Example
This section explains how to set the DMAC using an example. (1) Transferring music data from internal RAM to I2S by DMA transfer The 32 Kbytes of data stored in the internal RAM at addresses 2000H to 9FFFH shall be transferred to FIFO-RAM via I2S. Each time an INTI2S request is asserted, 64 bytes (4 bytes x 16 times) shall be transferred to FIFO-RAM using DMAC channel 0. Since INTI2S is an FIFO empty interrupt, the first data must be set in advance. Therefore, only the first 64 bytes shall be transferred by DMA soft start. After 32 Kbytes have been transferred, the INTDMA0 interrupt routine shall be activated to prepare for the next processing. (a) Main routine No
1 2 3 4 5 6 7 8 9 10 11 12 13 ldl ldl ldw ldw ldb set ld nop ld ld ldw ldw ei (dma0v),i2s_vector (intedma01),xxH (i2sctl0),xxxxH (i2sctl1),xxxxH xx
Instruction
(hdmas0),2000H (hdmad0),i2sbuf (hdmaca0),16 (hdmacb0),512 (hdmam0),0AH 0,(hdmae) (dmar),01H
Comments
; Source address = 2000H ; Destination address = i2sbuf ; Counter A = 16 ; Counter B = 512 (32768/64) ; Transfer mode = source INC, 4 bytes ; Enable DMA channel 0. ; Transfer the first 64 bytes by DMA soft start. ; ; INTI2S = DMA0 ; INTDMA level = x ; Set operation mode for I2S. ; Start I2S transmission. ; Enable CPU interrupts.
(b) INTDMA0 interrupt routine No
1 2 3 4 5 6 7 8 9 10 11 reti ; res : : : :
Instruction
0,(hdmae)
Comments
; Disable DMA channel 0.
92CF26A-98
2007-11-21
TMP92CF26A 3.6.5 Note
In case of using S/W start with HDMA, transmission start is to set to "1" DMAR register. However DMAR register can't be used to confirm flag of transmission end. DMAR register reset to "0" when HDMA release bus occupation once with HDMATR function. We recommend to use HDMACBn register (counter value) to confirm flag of transmission end.
92CF26A-99
2007-11-21
TMP92CF26A 3.6.6 Considerations for Using More Than One Bus Master
In the TMP92CF26A, the LCD controller, SDRAM controller, and DMA controller may act as the bus master apart from the CPU. Therefore, care must be exercised to enable each of these functions to operate smoothly. To facilitate explanation of DMA operation performed by each bus master, the DMA transfer operation performed by the DMA controller is defined as "HDMA", the display RAM read operation performed by the LCD controller as "LDMA", and the SDRAM auto refresh operation performed by the SDRAM controller as "ARDMA". The following explains various cases where two or more bus masters may operate at the same time. (1) CPU + HDMA The DMA controller performs DMA transfer (HDMA) after issuing a bus request to the CPU and getting a bus acknowledgement. The DMA controller may be active while the CPU is in HALT mode (IDLE2 mode only), in which case HDMA does not interfere with the CPU operation. However, if HDMA is started while the CPU is active, the CPU cannot execute instructions while HDMA is being performed. Before activating the DMA controller, therefore, it is necessary to estimate the CPU stop time (defined as "tSTOP (HDMA)") based on the transfer time, transfer start interval, and number of channels to be used. CPU bus stop rate = tSTOP (HDMA)[s] / HDMA start interval [s] HDMA start interval [s] = HDMA start interrupt period [s]
Note: The HDMA start interval depends on the period of the HDMA start interrupt source. However, it is also possible to start HDMA by software.
tSTOP (HDMA) [s] = (Source read time + Destination write time) x Transfer count + state/byte
Memory Type Read / Write Read Write Internal RAM 1/4
(Note 1)
External SDRAM 16-bit bus Burst 1 / 2 1 word 6 / 2 Burst 1 / 2 1 word 3 / 2
(Note 2) (Note 2) (Note 2) (Note 2)
External SRAM 16-bit bus 2/2 2/2
(Note 3)
External SRAM 8-bit bus 2/1 2/1
(Note 3)
1/4
(Note 3)
(Note 3)
Note 1: 2-1-1-1 access. Each consecutive address can be accessed in 1 state. Note 2: The transfer speed varies depending on the combination of source and destination. a) When the source or destination is internal RAM or internal I/O (SFR), burst access (6-1-1-1 access) is possible. Only consecutive addresses on the same page can be accessed in 1 state. Additional 4 states are needed at the end of each burst access. b) When the source or destination is other than internal RAM or internal I/O, 1-word access is used. Note 3: In the case of 0 waits
state/byte
I/O Type Read / Write Read Write I2S - 2/4 NANDF 2/2 2/2 USB 2/2 2/2 SPI 2/4 2/4
92CF26A-100
2007-11-21
TMP92CF26A
Sample 1: Calculation example for CPU + HDMA Conditions: CPU operation speed (fSYS) I2S data transfer bit length : 60 MHz : 16 bits I2S sampling frequency : 48 KHz (60 MHz/25/50 = 48 KHz) DMAC channel 0 used to transfer 5 Kbytes from internal RAM to I2S Calculation example: DMAC source data read time: Internal RAM data read time = 1 state/4 bytes (However, the first 1 byte requires 2 states.) DMAC destination write time: I2S register write time = 2 states/4 bytes Transfer count To transfer 5 Kbytes of data in 4-byte units, the transfer count is calculated as follows: 5 Kbytes/4 bytes = 1280 [times] Since I2S generates an interrupt for every 64 bytes, the DMAC's counter A is set to 16 (64 bytes/4 bytes = 16 times) and counter B is set to 80.
Note: Since an interrupt is generated 80 times, the first read to internal RAM (which requires 1 additional state) occurs 80 times, requiring additional 80 states in total. In addition, from bus REQ to bus ACK, an overhead time of 2 states is also needed for each interrupt request, requiring additional 160 states in total.
tSTOP (HDMA) = (((1 + 2) x 16) x 80) + 80 + 160) / fSYS [S] = 68 [S] HDMA start interval [s] = 1 / I2S sampling frequency [Hz] x (64 / 16 ) = 83.33 [mS] CPU bus stop rate = tSTOP (HDMA) [s] / HDMA start interval [s] = 68 [S] / 83.33 [mS] = 0.08 [%]
92CF26A-101
2007-11-21
TMP92CF26A
(2) CPU + LDMA The LCD controller performs DMA transfer (LDMA) after issuing a bus request to the CPU and getting a bus acknowledgement. If LDMA is not performed properly, the LCD display function cannot work properly. Therefore, LDMA must have higher priority than the CPU. While LDMA is being performed, the CPU cannot execute instructions. To display data on the LCD using the LCD controller, it is necessary to estimate to what degree LDMA would interfere with the CPU operation based on the display RAM type, display RAM bus width, LCDD type, display pixel count, and display quality. The time the CPU stops operation while the LCD controller transfers data for one line is defined as "tSTOP (LDMA)", which is calculated as shown below for each display mode. tSTOP (LDMA) = (SegNum x K / 8) x tLRD 16-bit external SRAM Internal RAM SegNum K Monochrome 4 gray scales 16 gray scales 256 colors 4096 colors 65536 colors 262144/16777216 colors K = 12 K = 16 K = 24 : tLRD = (2 + wait count) / fSYS [Hz] / 2 : tLRD = 1 / fSYS [Hz] / 4 : Number of segments to be displayed : Number of bits needed for displaying 1 pixel K=1 K=2 K=4 K=8
16-bit external SDRAM : tLRD= 1 / fSYS [Hz] / 2
Note 1: When SDRAM is used, the overhead time is added as shown below. tSTOP [s] = (SegNum x K/8) x tLRD + ((1/fSYS) x 8) Note 2: When internal RAM is used, the overhead time is added as shown below. tSTOP [s] = ( SegNum x K/8 )x tLRD + (1/fSYS)
The CPU bus stop rate indicates what proportion of the 1-line data update time tLP is taken up by tSTOP (LDMA) and is calculated as follows: CPU bus stop rate = tSTOP (LDMA) [s] / LHSYNC [period: s]
92CF26A-102
2007-11-21
TMP92CF26A
Sample2: Calculation examples for CPU + LDMA Conditions 1: CPU operation speed (fSYS) Display RAM Display size Display quality Refresh rate Calculation example 1: tSTOP (LDMA) = ((SegNum x K / 8) x tLRD) + (1 / fSYS [Hz]) = ((320 x 16 / 8) x 1 / fSYS [Hz] / 4) + (1 / fSYS [Hz]) = ((640) x 16.67 [ns] / 4) + 16.67 [ns] = 2.68 [s] LHSYNC [period: s] CPU bus stop rate = 1/70 [Hz] / (COM+20=260) = 54.95 [s] = tSTOP (LCD)[s] / LHSYNC [period: s] = 2.68 [s] / 54.95 [s] = 4.88 [%] : 60 MHz : Internal RAM : QVGA (320seg x 240com) : 65536 colors (TFT) : 70 Hz (including 20 clocks of dummy cycles)
Conditions 2: CPU operation speed (fSYS) Display RAM Display size Refresh rate : 10 MHz : 16-bit external SRAM (0 waits) : QVGA (240seg x 320com) : 100 Hz (0 dummy cycles)
Display quality : 4096 colors (STN)
Calculation example 2: tSTOP (LDMA) = (SegNum x K / 8) x tLRD = (240 x 12 / 8) x (2 + wait count) / fSYS [Hz] / 2 = (360) x 200 [ns] / 2 = 36 [s] LHSYNC [period: s] CPU bus stop rate = 1/100 [Hz] / (COM = 240) = 41.67 [s] = tSTOP (LCD)[s] / LHSYNC [period: s] = 36 [s] / 41.67 [s] = 86.40 [%]
92CF26A-103
2007-11-21
TMP92CF26A
(3) CPU + LDMA + ARDMA The SDRAM controller owns the bus not only when SDRAM is used as the LCD display RAM but also when SDRAM is used as work, data, or stack area. The SDRAM controller occupies the bus (ARDMA) while it refreshes SDRAM data by the auto refresh function. No special consideration is needed for the ARDMA time normally as it ends within several clocks per specified number of states. However, if the LCD controller occupies the bus continuously, ARDMA cannot be executed at normal intervals and refresh data is stored in a counter specifically provided in the SDRAM controller. In this case, ARDMA is executed successively after the LCD controller releases the bus. The priorities among the three bus masters should be set in the order of LCDC > SDRAMC > CPU. The time the CPU stops operation while the LCD controller and SDRAM controller are transferring data for one line is defined as "tSTOP (LDMA ARDMA)", which is calculated as follows: tSTOP (LDMAARDMA) = tSTOP (LDMA)[s] - (tSTOP (LDMA)[s] / AR interval [s] x 2 / fSYS [Hz]) CPU bus stop rate = tSTOP (LDMAARDMA)[s] / LHSYNC [period: s] Auto Refresh Intervals SDRCR SRS2
0 0 0 0 1 1 1 1 Unit: [s]
SRS1
0 0 1 1 0 0 1 1
SRS0
0 1 0 1 0 1 0 1
Auto Refresh Interval (states)
47 78 156 312 468 624 936 1248
Frequency (System Clock) 6 MHz
7.8 13.0 26.0 52.0 78.0 104.0 156.0 208.0
10MHz
4.7 7.8 15.6 31.2 46.8 62.4 93.6 124.8
20MHz
2.4 3.9 7.8 15.6 23.4 31.2 46.8 62.4
40MHz
1.18 1.95 3.90 7.80 11.70 15.60 23.40 31.20
60MHz
0.78 1.30 2.60 5.20 7.80 10.40 15.60 20.80
80MHz
0.59 0.98 1.95 3.90 5.85 7.80 11.70 15.60
92CF26A-104
2007-11-21
TMP92CF26A
Sample3: Calculation example for CPU + LDMA + ARDMA Conditions: CPU operating speed (fSYS) Display RAM Display size Display quality Refresh rate SDRAM auto refresh Calculation example: tSTOP (LDMA) =((SegNum x K / 8) x tLRD) + (8 / fSYS [Hz]) = ((320 x16 / 8) x 1 / fSYS [Hz] / 2) + (8 / fSYS [Hz]) = ((640) x 16.67 [ns] / 2) + 133.33 [ns] = 5.47 [s] LHSYNC [period:s] = 1/70 [Hz] / (COM + 20 = 260) = 54.95 [s] : 60 MHz : 16-bit external SDRAM : QVGA (320seg x 240com) : 65536 colors (TFT) : 70 Hz (including 20 clocks of dummy cycles) : Every 936 states (15.6 s)
Since SDRAM is auto-refreshed once or less in 5.47 [s]: tSTOP (ARDMA) CPU bus stop rate = 2 / fSYS [Hz] = 33.33 [ns] = tSTOP (LDMAARDMA) [s] / LHSYNC [period:s] = (5.47 [s] + 33.33 [ns]) / 54.95 [s] = 10.01 [%]
92CF26A-105
2007-11-21
TMP92CF26A
(4) CPU + LDMA+ ARDMA + HDMA This is a case in which all the bus masters are active at the same time. Since the LCD display function cannot work properly if the LCD controller cannot perform LDMA properly, the priorities among the four bus masters should be set in the order of LDMA > ARDMA > HDMA > CPU. Before calculating the CPU bus stop rate, the conditions for proper LCD display shall be considered first.
Setup time 1
LHSYNC LCP0 LD-bus LDMA1 HDMA (Worst case) LDMA2
Setup time 2
The above diagram shows the LHSYNC signal, LCP0 signal, and LD-bus signal for transferring data from the LCD controller to the LCD driver, and the transfer operation (LDMA1) for reading data from the display RAM into the FIFO buffer in the LCD controller. LDMA is started immediately after data has been transferred to the LCD driver. If HDMA is started immediately before LDMA1 is started, LDMA must wait until HDMA has finished before it can be started (LDMA2). LDMA2 must finish operation before the LCD driver output for the next stage is started. LHSYNC [period: s] - LCD driver data transfer time [s] - tSTOP (LCD) [s] = HDMA continuous time [s] + CPU operation time [s] In the case of STN display LCD driver data transfer time [s] = SegNum/8x(1/fSYS) x (LD bus transfer speed) In the case of TFT display LCD driver data transfer time [s] = SegNumx(1/ fSYS) x (LD bus transfer speed)
92CF26A-106
2007-11-21
TMP92CF26A
Sample 4: Calculation example for CPU + LDMA+ ARDMA + HDMA Conditions: CPU operation speed (fSYS) Display RAM Display quality Refresh rate SDRAM Auto Refresh SDRAM HDMA : 60 MHz : QVGA (320seg x 240com) : 65536 colors (TFT) : 70 Hz (including 20 clocks of dummy cycles) : Every 936 states (15.6 s) : 16-bit width : Transfers 5 Kbytes from internal RAM to I2S
Calculation example: tSTOP (LDMA) =((SegNum x K / 8) x tLRD) + (1 / fSYS [Hz]) = ((320 x16 / 8) x 1 / fSYS [Hz] / 4) + (1 / fSYS [Hz]) = ((640) x16.67 [ns] / 4) + 16.67 [ns] = 2.68 [s] LHSYNC [period: s] = 1/70 [Hz] /(COM+20 = 260) = 54.95 [s] tSTOP (HDMA) = (((1 + 2) x 16) x 80) + 80 + 160) / fSYS [s] = 68 [s] LCD driver data transfer time [s] = SegNum x (1/ fSYS) x (LD bus transfer speed) = 320 x (1/60 MHz) x 16 = 85 [s] Since LHSYNC [period: s] < LCD driver data transfer time [s], this setting is not possible. When the transfer speed is changed to x4, the LCD driver data transfer time is calculated as follows: (The transfer speed should be adjusted according to the required specifications.) LCD driver data transfer time [s] = SegNum x (1/ fSYS) x (LD bus transfer speed) = 320 x (1 / 60MHz) x 4 = 21.3 [s] LHSYNC [period: s] - LCD driver data transfer time [s] - tSTOP (LDMA) = 54.95 [s] - 21.3 [s] - 2.68 [s] = 30.94 [s] To realize proper LCD display, the maximum time HDMA can occupy the bus at a time (maximum HDMA time) must be set to 30.92 [S] or less. Although transferring all 5 Kbytes from the internal RAM to I2S requires tSTOP (HDMA) = 68 [s], the maximum HDMA time should be limited by using the HDMATR register.
92CF26A-107
2007-11-21
TMP92CF26A
HDMATR Register
7 HDMATR (097FH) bit Symbol Read/Write Reset State 0 Timer Function operation 0: Disable 1: Enable 0 0 0 DMATE 6 DMATR6 5 DMATR5 4 DMATR4 3 DMATR3 0 2 DMATR2 0 1 DMATR1 0 0 DMATR0 0
R/W Maximum bus occupancy time setting The value to be set in should be obtained by "Maximum bus occupancy time / (256/ fSYS)". "00H" cannot be set.
Note: Read-modify-write instructions can be used on this register.
By writing "87H" to the HDMATR register, the maximum HDMA time is set to 29.9 [s] (256 x 7 x (1 / fSYS)). Since HDMA start interval [period:s] = 83.33 [ms] is longer than LHSYNC [period:s] = 54.95 [s], it is assumed that HDMA transfer occurs once during LHSYNC [period:s]. Since SDRAM is auto-refreshed once or less in 5.47 [s]: tSTOP (ARDMA) = 2 / fSYS [Hz] = 33.33 [ns] The time LDMA, ARDMA, and HDMA all occupy the bus is defined as: tSTOP (LDMAARDMAHDMA) Based on the above, the CPU bus stop rate is calculated as follows: CPU bus stop rate = tSTOP (LDMAARDMAHDMA) [s] / LHSYNC [period:s] = (5.47 [s] + 33.33 [ns]+ 29.9 [s]) / 54.95 [s] = 64.42 [%]
Note: To be precise, the bus assert time and RAM access time are added each time the HDMA transfer time is forcefully terminated at 29.9 [s].
92CF26A-108
2007-11-21
TMP92CF26A
Sample 5: Calculation example when using CPU + LCDC + SDRAMC + HDMA at same time (Worst case) Conditions: CPU operation speed (fSYS) Display RAM Display size Display quality Refresh rate HDMA Calculation example: tSTOP (LCD) = ((SegNum x K/8) x tLRD) + (1/fSYS [Hz]) = ((320 x 24/8) x 1/fSYS [Hz]/4) + (1/fSYS [Hz]) = ((960) x 12.5 [nS]/4) + 12.5 [nS] = 3.0125 [S] LHSYNC [period: S] = 1/70 [Hz]/ (COM+20) = 54.9 [S] tSTOP (HDMA) = (((2 + 1) x 4) x 57600) + 28800 + 14400)/ fSYS [S] = 9180 [S] : 80MHz : Internal RAM : QVGA (320seg x 240com) : 16777216 color (TFT) : 70Hz : Transfers 225 Kbytes from internal RAM to SDRAM
LCD driver data transfer time [S] = SegNum x (1/ fSYS) x (LD bus transfer speed) = 320 x (1/80MHz) x 8 = 32 [S] LHSYNC [cycle S] - LCD driver data transfer time [S] - tSTOP (LCD) = 54.9 [S] - 32 [S] - 3.0125 [S] = 19.8875 [S] To realize proper LCD display, the maximum time HDMA can occupy the bus at a time (maximum HDMA time) must be set to 19.8875 [S] or less. Although transferring all 225 Kbytes from the internal RAM to SDRAM requires tSTOP (HDMA) = 9180 [s], the maximum HDMA time should be limited by using the HDMATR register. HDMATR register 7
HDMATR (097FH) Bit Symbol Read/Write Reset State Function 0 Timer operation 0: Disable 1:Enable 0 0 0 DMATE
6
DMATR6
5
DMATR5
4
DMATR4 R/W
3
DMATR3 0
2
DMATR2 0
1
DMATR1 0
0
DMATR0 0
Maximum bus occupancy time setting The value to be set in should be obtained by "Maximum bus occupancy time / (256/fSYS)". "00H" cannot be set.
Note: Read-modify-write instructions can be used on this register.
By writing "86H" to the HDMATR register, the maximum HDMA time is set to 19.2[s] (256 x 6 x (1 / fSYS)).
Note: To be precise, the bus assert time and RAM access time are added each time the HDMA transfer time is forcefully terminated at 19.2 [s].
92CF26A-109
2007-11-21
TMP92CF26A
3.7
Function of ports
The TMP92CF26A I/O port pins are shown in Table 3.7.1. In addition to functioning as general-purpose I/O ports, these pins are also used by the internal CPU and I/O functions. Table 3.7.2 lists the I/O registers and their specifications.
Table 3.7.1 Port Functions (1/3) (R: PD= with programmable pull-down resistor, U= with pull-up resistor) Port Name
Port 1 Port 4 Port 5 Port 6
Pin Name
P10 to P17 P40 to P47 P50 to P57 P60 to P67 P70 P71 P72 P73 P74 P75
Number of Pins
8 8 8 8 1 1 1 1 1 1
I/O
I/O Output Output I/O Output I/O I/O I/O I/O I/O
R
- - - - - - - - - - - - - - - - - - - - - -
I/O Setting
bit bit bit bit (Fixed) bit bit bit bit bit
Pin Name for built-in function
D8 to D15 A0 to A7 A8 to A15 A16 to A23
RD WRLL , NDRE WRLU , NDWE
Port 7
EA24 EA25 R/ W , NDR/ B
WAIT CS0 CS1, SDCS CS2 , CSZA CS3 , CSXA CSZB CSZC
P76
Port 8
1 1 1 1 1 1 1 1
1 1 1 1 1 1 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2
I/O Output Output Output Output Output Output Output
Output I/O I/O I/O Input Input Input I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O Output Input Input Input Input
bit (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed)
(Fixed) bit bit bit (Fixed) (Fixed) (Fixed) bit bit bit bit bit bit bit bit bit bit bit bit bit bit (Fixed) (Fixed) (Fixed) (Fixed) (Fixed)
P80 P81 P82 P83 P84 P85 P86
P87
CSZD , ND0CE
CSXB , ND1CE
Port 9
P90 P91 P92 P96 P97
TXD0 RXD0 SCLK0, CTS0 INT4, PX PY KI0 to KI7 INT0 INT1, TA0IN INT2 INT3, TA2IN EA26 EA27 EA28 KO8 I2S0CKO I2S0DO I2S0WS I2S1CKO I2S1DO I2S1WS SDCLK AN0 to AN1 AN2, MX AN3, ADTRG , MY AN4 to AN5
PD
-
Port A Port C
PA0 to PA7 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7
U
- - - - - - - - - - - - - - - - - - -
Port F
PF0 PF1 PF2 PF3 PF4 PF5 PF7
Port G
PG0 to PG1 PG2 PG3 PG4 to PG5
92CF26A-110
2007-11-21
TMP92CF26A
Table 3.7.1 Port Functions (2/3) Port Name
Port J
Pin Name
PJ0 PJ1 PJ2 PJ3 PJ4 PJ5 PJ6 PJ7
Number of Pins
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 8 1 1 1 8 1 1 1 1 1 1 1 1 1 1 1 8 6 1 1 1 1 1 1 1 1 1 8 1 1 1
I/O
Output Output Output Output Output I/O I/O Output Output Output Output Output Output Output Output Output Output Output Output Output I/O I/O I/O I/O I/O I/O Output Output I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O Output Output I/O I/O I/O Output I/O I/O
R
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I/O Setting
(Fixed) (Fixed) (Fixed) (Fixed) (Fixed) bit bit (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) (Fixed) bit bit bit bit bit bit (Fixed) (Fixed) bit bit bit bit bit bit bit bit bit bit bit (Fixed) (Fixed) bit bit bit bit bit bit
Pin Name for built-in function
SDRAS , SRLLB SDCAS , SRLUB SDWE , SRWR
SDLLDQM SDLUDQM NDALE NDCLE SDCKE LCP0 LLOAD LFR LVSYNC LHSYNC LGOE0 LGOE1 LGOE2 LD0 to LD7 MLDALM, TA1OUT
Port K
PK0 PK1 PK2 PK3 PK4 PK5 PK6 PK7
Port L Port M
PL0 to PL7 PM1 PM2 PM7
ALARM , MLDALM
PWE KO0 to KO7 TA3OUT TA5OUT INT5, TA7OUT INT6, TB0IN0 INT7, TB1IN0 TB0OUT0 TB1OUT0 SPDI SPDO
Port N Port P
PN0 to PN7 PP1 PP2 PP3 PP4 PP5 PP6 PP7
Port R
PR0 PR1 PR2 PR3
SPCS
SPCLK LD8 to LD15 LD16 to LD20 , LD22 LD21 LD23, EO_TRGOUT SCLK0
- - - -
Port T Port U
PT0 to PT7 PU0 to PU4 ,PU6 PU5 PU7
Port V
PV0 PV1 PV2 PV3 PV4 PV6 PV7
SDA SCL
-
Port W Port X
PW0 to PW7 PX4 PX5 PX7
CLKOUT, LDIV X1USB
-
92CF26A-111
2007-11-21
TMP92CF26A
Table 3.7.1 Port Functions (3/3) Port Name
Port Z
Pin Name
PZ0 PZ1 PZ2 PZ3 PZ4 PZ5 PZ6 PZ7
Number of Pins
1 1 1 1 1 1 1 1
I/O
I/O I/O I/O I/O I/O I/O I/O I/O
R
- - - - - - - -
I/O Setting
bit bit bit bit bit bit bit bit
Pin Name for built-in function
EI_PODDATA EI_SYNCLK EI_PODREQ EI_REFCLK EI_TRGIN EI_COMRESET EO_MCUDATA EO_MCUREQ
92CF26A-112
2007-11-21
TMP92CF26A
Table 3.7.2 I/O Port and Specifications (1/4) Port
Port 1
X: Don't care I/O register Pn
X X X X X X X X X X X X X 1 0 1 0 X X X X X X X X X X X X X X X X X X X X None
Pin name
P10 toP17 Input port Output port
Specification
PnCR
0 1 X None None None None 0 1 X 1 0 None 1 1 1 1 1 0 0
PnFC PnFC2
0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 1 1 1 0 1 1 X 1 0 1 1 X 1 1 1 1 1 1 0 None 0 1 0 1 1 0 1 None 0 1 0 1 None None None None
D8 to D15 bus Port 4 Port 5 Port 6 P40 to P47 P50 to P57 P60 to P67 Output port A0 to A7 Output Output port A8 to A15 Output Input port Output port A16 to A23 Output Port 7 P70 to P76 P71 to P76 P70 P71 P72 P73 P74 P75 P76 Port 8 P80 to P87 P80 P81 P82 Output port Input port
RD Output WRLL Output NDRE Output WRLU Output NDWE Output
None
EA24 Output EA25 Output R/ W Output NDR/B Input
WAIT Input
Output port CS0 Output
CS1 Output SDCS Output CS2 Output CSZA Output SDCS Output
P83 P84 P85 P86 P87
CS3 Output CSXA Output CSZB Output CSZC Output CSZD Output ND0CE Output
CSXB Output
ND1CE Output
92CF26A-113
2007-11-21
TMP92CF26A
Table3.7.2 I I/O Port and Specifications (2/4) Port
Port 9
X: Don't care I/O register Pn
X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X 1 X X X
Pin name
P90, P92 P91 P96 P97 P90 to P92 P90 P92 P96 Input port
Specification
PnCR
0 0 None None 1 1 1 1 0 None None 0 1 0 0 1 0 0 1 0 0 0 1 0 1 None X X X X X X None
PnFC PnFC2
0 None 0 None 0 1 1 1 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 None None None None None None 0 0 1 0 0 None None
Input port, RXD0 Input Input port Input port Output port TXD0 Output TXD0 Output (Open-drain) SCLK0 Output SCLK0, CTS0 Input INT4 Input Input port KI0 to KI7 Input Input port Output port INT0 Input INT1 Input TA0IN Input INT2 Input INT3 Input TA2IN Input EA26 Output EA27 Output EA28 Output KO8 Output (Open-drain) Input port Output port Output port I2S0CKO Output I2S0DO Output I2S0WS Output I2S1CKO Output I2S1DO Output I2S1WS Output SDCLK Output
Port A Port C
PA0 to PA7 PC0 to PC7 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7
Port F
PF0 to PF5 PF0 to PF5 PF7 PF0 PF1 PF2 PF3 PF4 PF5 PF7
92CF26A-114
2007-11-21
TMP92CF26A
Table3.7.2 I/O Port and Specifications (3/4) Port
Port G
X: Don't care I/O register
Pin name
PG0 to PG5 PG3 PG2 PG3 Input port
Specification Pn
AN0 to AN5 Input ADTRG Input MX Output MY Output Input port Output port Output port Note: Note: X X X X X X X X X X X X X X X X X X X X X X X 0 1 0 1 X X X X X X X X X X X X X X X X X 0 1 None 1 1 0 1 0 1 0 1 None 0 1 None None None 1 None None 0 1 None
PnCR
PnFC PnFC2
0
X
None
1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 1 0 0 0 1 1 1 1 1 1 1
None
Port J
PJ5 to PJ6 PJ5 to PJ6 PJ0 to PJ4, PJ7 PJ0 PJ1 PJ2 PJ3 PJ4 PJ5 PJ6 PJ7
SDRAS , SRLLB Output SDCAS , SRLUB Output SDWE , SRWR Output
SDLLDQM Output SDLUDQM Output NDALE Output NDCLE Output SDCKE Output Output port LCP0 output LLOAD output LFR output LVSYNC output LHSYNC output LGOE0 output LGOE1 output LGOE2 output Output port LD0 to LD7 Output Output port TA1OUTOutput MLDALM Output
None
Port K
PK0 to PK7 PK0 PK1 PK2 PK3 PK4 PK5 PK6 PK7
None
Port L Port M
PL0 to PL7 PL0 to PL7 PM1 to PM2 PM1 PM2 PM7
None
MLDALM Output ALARM Output
PWE Output Input port Output port (CMOS Output) KO Output (Open-drain Output)
None
Port N
PN0 to PN7
None
Port P
PP1 to PP5 PP1 to PP5 PP6 to PP7 PP1 PP2 PP3 PP4 PP5 PP6 PP7
Input port Output port Output port TA3OUT output TA5OUT output INT5 input TA7OUT output INT6 input TB0IN0 input INT7 input TB1IN0 input TB0OUT0 output TB1OUT1 output
None
Note: Case of using touch screen
92CF26A-115
2007-11-21
TMP92CF26A
Table 3.7.2 I/O Port and Specifications (4/4) Port
Port R
X: Don't care I/O register Pn
X X X X X X X X X X X X X X X X X X X X X X X X X X X X 0 1 X X X X X X X X X X X
Pin name
PR0 to PR3 PR0 to PR3 PR0 PR1 PR2 PR3 Input port Output port SPDI Input
Specification
PnCR
0 1 0 1 1 1 0 1 1 0 1 1 X 0 1 0 1 1 1 1 1 1 1 0 1 0 None 1 None 0 0 1 X X X X X X X X
PnFC PnFC2
0 0 1 1 1 1 0 0 1 0 0 1 X 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 X X X X X X X X None None None None 0 1 None 0 1 0 1 None None None None
SPDO Output
SPCS Output
SPCLK Output Input port Output port LD8 to LD15 Output Input port Output port LD16 to LD23 Output EO_TRGOUT ( DBGE = "0") Note: Input port Output port Input port Output port Output port (Open-drain) SCLK0 Output SDA I/O SDA I/O (Open-drain) SCL I/O SCL I/O (Open-drain) Input port Output port Input port Output port Output port CLKOUT Output LDIV Output X1USB Input Input port Output port EI_PODDATA ( DBGE = "0") Note: EI_SYNCLK ( DBGE = "0") Note: EI_PODREQ ( DBGE = "0") Note: EI_REFCLK ( DBGE = "0") Note: EI_TRGIN ( DBGE = "0") Note: EI_COMRESET ( DBGE = "0") Note: EO_MCUDATA ( DBGE = "0") Note: EO_MCUREQ ( DBGE = "0") Note:
Port T
PT0 to PT7 PT0 toPT7 PT0 to PT7
Port U
PU0 to PU7 PU0 to PU7 PU0 to PU7 PU7
Port Va
PV0 to PV2 PV0 to PV4 PV6 to PV7 PV6 to PV7 PV6 to PV7 PV0 PV6 PV7
Port W
PW0 to PW7 PW0 to PW7
Port X
PX5, PX7 PX4 PX5, PX7 PX4 PX5
Port Z
PZ0 to PZ7 PZ0 PZ1 PZ2 PZ3 PZ4 PZ5 PZ6 PZ7
Note: When Debug mode, it is set to the Debug pin regardless of port setting.
92CF26A-116
2007-11-21
TMP92CF26A 3.7.1 Port 1 (P10 to P17)
Port1 is an 8-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control register P1CR and function register P1FC. In addition to functioning as a general-purpose I/O port, port1 can also function as a data bus (D8 to D15). Setting the AM1 and AM0 pins as shown below and resetting the device initialize port 1 to the following function pins: AM1
0 0 1 1
AM0
0 1 0 1
Function Setting after reset is released
Don't use this setting Data bus (D8 to D15) Don't use this setting Input port (P10 to P17)
P1CR Register P1FC Register
External write enable
P1 Register
S 0
D8 to D15
S
1 Selector
P10 to P17 (D8 to D15)
Port read data D8 to D15
1 0
Selector
External read enable
Figure 3.7.1 Port1
92CF26A-117
2007-11-21
TMP92CF26A
Port 1 register 7
P1 bit Symbol P17 (0004H) Read/Write System Reset State Hot Reset State
6
P16
5
P15
4
P14 R/W
3
P13
2
P12
1
P11
0
P10
Data from external port (Output latch register is cleared to "0")
-
Port 1 Control register 7
P1CR bit Symbol P17C (0006H) Read/Write System Reset State Hot Reset State Function
6
P16C
5
P15C
4
P14C W
3
P13C
2
P12C
1
P11C
0
P10C
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0: Input 1: Output
Port 1 Function register 7
P1FC bit Symbol (0007H) Read/Write System Reset State (Note2) Hot Reset State Function
6
5
4
3
2
1
0
P1F W 0/1
-
0: Port 1:Data bus (D8 to D15)
Port 1 Drive register 7
P1DR bit Symbol P17D (0081H) Read/Write System Reset State Hot Reset State Function
6
P16D
5
P15D
4
P14D
R/W
3
P13D
2
P12D
1
P11D
0
P10D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode
Note1: A read-modify-write operation cannot be performed for P1CR, P1FC. Note2: It is set to "Port" or "Data bus" by AM pins state.
Figure 3.7.2 Register for Port1
92CF26A-118
2007-11-21
TMP92CF26A 3.7.2 Port 4 (P40 to P47)
Port4 is an 8-bit general-purpose Output ports. In addition to functioning as a general-purpose Output port, port4 can also function as an address bus (A0 to A7). Each bit can be set individually for function. Setting the AM1 and AM0 pins as shown below and resetting the device initialize port 4 to the following function pins: AM1
0 0 1 1
AM0
0 1 0 1
Function Setting after reset is released
Don't use this setting Address bus (A0 to A7) Don't use this setting Output port (P40 to 47)
P4FC Register
P4 Register
S 0 A0 to A7 1
P40 to P47 (A0 to A7)
Selector Read data Figure 3.7.3 Port4
92CF26A-119
2007-11-21
TMP92CF26A
Port 4 register 7
P4 (0010H) bit Symbol Read/Write System Reset State Hot Reset State P47
6
P46
5
P45
4
P44 R/W
3
P43
2
P42
1
P41
0
P40
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
Port 4 Function register 7
P4FC (0013H) bit Symbol Read/Write System Reset State (Note2) Hot Reset State Function P47F
6
P46F
5
P45F
4
P44F W
3
P43F
2
P42F
1
P41F
0
P40F
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0:Port
1:Address bus (A0 to A7)
Port 4 Drive register 7
P4DR (0084H) bit Symbol Read/Write System Reset State Hot Reset State Function P47D
6
P46D
5
P45D
4
P44D
R/W
3
P43D
2
P42D
1
P41D
0
P40D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode
Note1: A read-modify-write operation cannot be performed for P4FC. Note2: It is set to "Port" or "Data bus" by AM pins state.
Figure 3.7.4 Register for Port1r
92CF26A-120
2007-11-21
TMP92CF26A 3.7.3 Port 5 (P50 to P57)
Port5 is an 8-bit general-purpose Output ports. In addition to functioning as a general-purpose I/O port, port5 can also function as an address bus (A8 to A15). Each bit can be set individually for function. Setting the AM1 and AM0 pins as shown below and resetting the device initialize port 5 to the following function pins: AM1
0 0 1 1
AM0
0 1 0 1
Function Setting after reset is released
Don't use this setting Address bus (A8 ~ A15) Don't use this setting Output port (P50 ~ P57)
P5FC Register
P5 Register
S 0
A8 to A15 Read data
P50 to P57 (A8 to A15)
1
Selector
Figure 3.7.5 Port5
92CF26A-121
2007-11-21
TMP92CF26A
Port 5 register 7
P5 (0014H) bit Symbol Read/Write System Reset State Hot Reset State P57
6
P56
5
P55
4
P54 R/W
3
P53
2
P52
1
P51
0
P50
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
Port 5 Function register 7
P5FC (0017H) bit Symbol Read/Write System Reset State (Note2) Hot Reset State Function P57F
6
P56F
5
P55F
4
P54F W
3
P53F
2
P52F
1
P51F
0
P50F
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0:Port
1:Address bus (A8 to A15)
Port 5 Drive register 7
P5DR (0085H) bit Symbol Read/Write System Reset State Hot Reset State Function P57D
6
P56D
5
P55D
4
P54D
R/W
3
P53D
2
P52D
1
P51D
0
P50D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode
Note1: A read-modify-write operation cannot be performed for P5FC. Note2: It is set to "Port" or "Data bus" by AM pins state.
Figure 3.7.6 Register for Port5
92CF26A-122
2007-11-21
TMP92CF26A 3.7.4 Port 6 (P60 to P67)
Port6 is an 8-bit general-purpose I/O ports. Bits can be individually set as either inputs or outputs and function by control register P6CR and function register P6FC. In addition to functioning as a general-purpose I/O port, port6 can also function as an address bus (A16 to A23). Setting the AM1 and AM0 pins as shown below and resetting the device initialize port 6 to the following function pins: AM1
0 0 1 1
AM0
0 1 0 1
Function Setting after reset is released
Don't use this setting Address bus(A16 ~ A23) Don't use this setting Input port(P60 ~ P67)
P6CR Register P6FC Register
P6 Register
S 0
A16 to A23
S
P60 to P67 (A16 to A23)
1 Selector
Read data
1 0
Selector
Figure 3.7.7 Port6
92CF26A-123
2007-11-21
TMP92CF26A
Port 6 register 7
P6 (0018H) bit Symbol Read/Write System Reset State Hot Reset State P67
6
P66
5
P65
4
P64 R/W
3
P63
2
P62
1
P61
0
P60
Data from external port (Output latch register is cleared to "0")
-
Port 6 Control register 7
P6CR (001AH) bit Symbol Read/Write System Reset State Hot Reset State Function P67C
6
P66C
5
P65C
4
P64C W
3
P63C
2
P62C
1
P61C
0
P60C
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0:Input 1:Output
Port 6 Function register 7
P6FC (001BH) bit Symbol Read/Write System Reset State (Note2) Hot Reset State Function P67F
6
P66F
5
P65F
4
P64F W
3
P63F
2
P62F
1
P61F
0
P60F
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0/1
-
0: Port 1:Address bus (A16 to A23)
7
P6DR (0086H) bit Symbol Read/Write System Reset State Hot Reset State Function P67D
6
P66D
Port 6 Drive buffer register 5 4 3
P65D P64D
R/W
2
P62D
1
P61D
0
P60D
P63D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode
Note1: A read-modify-write operation cannot be performed for P6CR, P6FC. Note2: It is set to "Port" or "Data bus" by AM pins state.
Figure 3.7.8 Register for Port 6
92CF26A-124
2007-11-21
TMP92CF26A 3.7.5 Port 7 (P70 to P76)
Port7 is a 7-bit general-purpose I/O port (P70 is used for output only). Bits can be individually set as either inputs or outputs by control register P7CR and function register P7FC. In addition to functioning as a general-purpose I/O port, P70 to P76 pins can also function as interface-pins for external memory. A reset initializes P70 pin to output port mode, and P71 to P76 pins to input port mode. Setting the AM1 and AM0 pins as shown below and resetting the device initialize port 7 to the following function pins: Initial setting of P70 pin AM1
0 0 1 1
AM0
0 1 0 1
Function Setting after reset is released
Don't use this setting
RD pin
Don't use this setting Output port (P70)
P7FC register
P7 register
RD
0 1
S P70 ( RD )
Selector
Port read data
P7CR register P7FC register P7 register
NDRE , NDWE
WRLL , WRLU 0 1 Selector S1 0 Selector S 0S 1 Selector
P71 ( WRLL , NDRE ) P72 ( WRLU , NDWE )
Port read data
Figure 3.7.9 Port7
92CF26A-125
2007-11-21
TMP92CF26A
P7CR register P7FC register
S 0 1 S1 Selector P73 (EA24) P74 (EA25)
P7 register EA24, EA25 Read data
0 Selector
P7CR register P7FC register P7 register R/W Port read data
S1 0 Selector 0S 1 Selector P75(R/W, NDR /B )
NDR/ B
P7CR register P7FC register P7 register Port read data
WAIT
P76 ( WAIT )
Figure 3.7.10 Port7
92CF26A-126
2007-11-21
TMP92CF26A
Port 7 register 4
P74
7
P7 (001CH) bit Symbol Read/Write System Reset State Hot Reset State
6
P76
5
3
P73
2
P72
1
P71
0
P70
P75
R/W Data from external port Data from external port Data from external port (Output latch register is (Output latch register is (Output latch register is set to "1") cleared to "0") set to "1")
- - -
1
-
7
P7CR (001EH) bit Symbol Read/Write System Reset State Hot Reset State Function
6
P76C
Port 7 Control register 5 4 3
P75C P74C W P73C
2
P72C
1
P71C
0
0
-
0
-
0
-
0
-
0
-
0
-
0: Input 1: Output
7
P7FC (001FH) bit Symbol Read/Write System Reset State Hot Reset State Function
6
P76F
Port 7 Function register 5 4 3
P75F P74F P73F W
2
P72F
1
P71F
0
P70F
0
-
0
-
0
-
0
-
0
-
0
-
0/1 Note3:
-
0:Port 1: WAIT
Refer to following table
0:Port 1: NDWE at =0 WRLU at =1
0:Port 1:
NDRE at =0 WRLL at =1
0:Port 1: RD
7
P7DR (0087H) bit Symbol Read/Write System Reset State Hot Reset State Function P73 setting
< 0 1 0 Input Port Reserved 1 Output Port EA24Output
6
P76D
Port 7 Drive register 5 4 3
P75D P74D P73D
R/W
2
P72D
1
P71D
0
P70D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode P72 setting
< 0 1 0 Input Port Reserved 1 Output Port
P71 setting
0 1 0 Input Port Reserved 1 Output Port NDRE Output
(at =0) WRLL Output (at =1)
NDWE Output (at =0) WRLU Output (at =1)
P76 setting
0 1 0 1
P75 setting
0 1 0 1
P74 setting
0 1 0 1
Input Port
WAIT Input
Output Port Reserved
Input Port NDR/ B Input
Output Port R/W Output
Input Port Reserved
Output Port EA25Output
Note1: A read-modify-write operation cannot be performed for P7CR, P7FC. Note2: When NDRE and NDWE are used, set registers in the following order to avoid outputting a negative glitch. Order Registser bit2 bit1 -----------------------------------------------------(1) P7 0 0 (2) P7FC 1 1 (3) P7CR 1 1 Note3: It is set to "Port" or "Data bus" by AM pins state.
Figure 3.7.11 Register for Port 7
92CF26A-127
2007-11-21
TMP92CF26A 3.7.6 Port 8 (P80 to P87)
Ports 80 to 87 are 8-bit output ports. Resetting sets the output latch of P82 to "0" and the output latches of P80 to P81, P83 to P87 to "1". But if it is started at boot mode (AM [1:0]= "11"), output latch of P82 is set to "1". Port 8 can also be set to function as an interface-pin for external memory using function register P8FC. Writing "1" in the corresponding bit of P8FC and P8FC2 enables the respective functions. Resetting P8FC to "0" and P8FC2 to "0", sets all bits to output ports.
Reset
Function control2
P8FC2 write Function control
P80 ( CS0 ) P81 ( CS1, SDCS ) P82 ( CS2 , CSZA , SDCS ) P83 ( CS3 , CSXA ) P84 ( CSZB ) P85 ( CSZC ) P86 ( CSZD , ND0CE ) P87 ( CSXB , ND1CE )
Internal data bus
P8FC write S Output latch Selector P8 write
CS0 , SDCS , SDCS , CSXA , CSZB , CSZC , ND0CE , ND1CE
P8 read
"1", SDCS , CSZA , CSXA ,"1", "1", "1", "1"
CS0 , CS1, CS2 , CS3 , CSZB , CSZC , CSZD , CSXB
Figure 3.7.12 Port 8
92CF26A-128
2007-11-21
TMP92CF26A
Port 8 register 4
P84 R/W 1
-
7
P8 (0020H) bit Symbol Read/Write System Reset State Hot Reset State P87
6
P86
5
3
P83
2
P82
1
P81
0
P80
P85
1
-
1
-
1
-
1
-
0 (Note3)
-
1
-
1
-
7
P8FC (0023H) bit Symbol Read/Write System Reset State Hot Reset State Function P87F
6
P86F
Port 8 Function register 5 4 3
P85F P84F W P83F
2
P82F
1
P81F
0
P80F
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0: Port 0: Port 0: Port 1: 1: 1: CSZC
0: Port 1: CSZB
Refer to following table
0: Port 1: CS1
0: Port 1: CS0
7
P8FC2 (0021H) bit Symbol Read/Write System Reset State Hot Reset State Function P87F2 W 0
-
0: CSXB 1: ND1CE
6
P86F2
Port 8 Function registers 2 5 4 3
P83F2
2
P82F2 W
1
P81F2
0
0
-
0: CSZD
0
-
0
-
0
-
1:
ND0CE
Refer to following table 0: 1: SDCS
7
P8DR (0088H) bit Symbol Read/Write System Reset State Hot Reset State Function P86 setting
0 1 0 Output port Don't setting 1
CSZD Output
6
P86D
Port 8 Drive register 5 4 3
P85D P84D R/W P83D
2
P82D
1
P81D
0
P80D
P87D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode P83 setting
0 1 0 Output port 1
P82 setting
0 1 0 Output port 1
CS3
Output
CS2 Output
SDCS Output
ND0CE Output
CSXA Output
CSZA
Output
P87 setting
0 1 0 Output port Don't setting 1
CSXB Output
ND1CE Output
Note1: A read-modify-write operation cannot be performed for P8FC and P8FC2. Note2: Do not write "1" to P8 register before setting P82-pin to CS2 or CSZA because, on reset, P82-pin outputs "0" as CE for program memory. Note3: If it is started at boot mode (AM [1:0] = "11"), output latch of P82 is set to "1". Note4: When ND0CE and ND1CE are used, set registers by following order. Order Registser bit2 bit1 -----------------------------------------------------(1) P8 1 1 (2) P8FC2 1 1 (3) P8FC 1 1
Figure 3.7.13 Register for Port 8
92CF26A-129
2007-11-21
TMP92CF26A 3.7.7 Port 9 (P90 to P92, P96, P97)
P90 to P92 are 3-bit general-purpose I/O port. I/O can be set on a bit basis using the control register. Each bit can be set individually for input or output. Resetting sets P90 to P92 to input port and all bits of output latch to"1". P96 to P97 are 2-bit general-purpose input port. Writing "1" the corresponding bits of P9FC enables the respective functions. Resetting resets the P9FC to "0", and sets all bits to input ports. (1) Port 90 (TXD0), Port 91 (RXD0), Port 92 (SCLK0, CTS0 ) Ports 90 to 92 are general-purpose I/O port. They also function as either SIO0. Each pin is detailed below.
SIO mode (SIO0 module)
P90 P91 P92 TXD0 (Data output) RXD0 (Data input) SCLK0 (Clock input or output)
UART, IrDA mode (SIO0 module)
TXD0 (Data output) RXD0 (Data input)
CTS0
(Clear to send)
Reset Direction control (on bit basis) P9CR write Function control (on bit basis) Internal data bus P9FC write S Output latch P9 write TXD0 output A S P90 (TXD0)
Open-drain enable P9FC2
Selector B SB Selector
P9 read
A
Figure 3.7.14 P90
92CF26A-130
2007-11-21
TMP92CF26A
Reset Direction control (on bit basis) P9CRwrite Internal data bus Function control (on bit basis) P9FCwrite S Output latch P9 write SCLK0 output A S P91(RXD0) P92(SCLK0, CTS0 )
Selector B SB Selector P9 read A RXD0 input SCLK0 input CTS0 input
Figure 3.7.15 P91, 92
Reset Function control TSICR0 TSICR0
Internal data bus
AVCC
P9FC write
Switch for TSI typ.10
P9 read
P96 (INT4,PX) P97 (PY)
TSICR1
Only for P96
S INT4 Rising/Falling edge-ditection
A
De-bounce Circuit
Selector B
IIMC
TSICR0
TSICR0 TSICR0
Pull-down resistor typ.50K
Figure 3.7.16 Port 96,97
92CF26A-131
2007-11-21
TMP92CF26A
Port 9 register 4
7
P9 (0024H) bit Symbol Read/Write System Reset State Hot Reset State P97
6
P96
5
3
2
P92
1
P91
0
P90
R Data from external port
-
R/W Data from external port (Output latch register is set to "1")
-
7
P9CR (0026H) bit Symbol Read/Write System Reset State Hot Reset State Function
6
Port 9 control register 5 4 3
2
P92C
1
P91C W
0
P90C
0
-
0
-
0
-
Refer to following table
7
P9FC (0027H) bit Symbol Read/Write System Reset State Hot Reset State Function 0:
6
P96F W 0 - Input
Port 9 function register 5 4 3
2
P92F W 0
-
1
0
P90F W 0
-
port 1: INT4
Refer to following table
Refer to following table
7
P9FC2 (0025H) bit Symbol Read/Write System Reset State Hot Reset State Function
-
6
Port 9 Function registers 2 5 4 3
2
-
1
0
P90F2 W 0
-
0:CMOS 1:Open-drain
W 0
-
W 0
-
Always write "0"
Always write "0"
7
P9DR (0089H) bit Symbol Read/Write System Reset State Hot Reset State Function P92 setting
0 1
6
P96D R/W
Port 9 drive register 5 4 3
2
P92D
1
P91D R/W
0
P90D
P97D
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode P91 setting 0 Output port SCLK0 Output
Input port RXD0 Input
P90 setting 0 1 0 Input port Don't setting 1 Output port TXD0 Output
0 1
Input port, CTS0 /SCLK0 Input Don't setting
1 Output port
Note 1: A read-modify-write operation cannot be performed for P9CR, P9FC and P9FC2. Note 2: When setting P96 pin to INT4 input, set P9DR to "0" (prohibit input), and when driving P96 pin to "0", execute HALT instruction. This setting generates INT4 inside. If don't using external interrupt in HALT condition, set like an interrupt don't generated. (e.g. change port setting)
Figure 3.7.17 Register for Port 9
92CF26A-132
2007-11-21
TMP92CF26A 3.7.8 Port A (PA0 to PA7)
Ports A0 to A7 are 8-bit general-purpose input ports with pull-up resistor. In addition to functioning as general-purpose I/O ports, ports A0 to A7 can also, as a Keyboard interface,operate a Key-on wake-up function. The various functions can each be enabled by writing a "1" to the corresponding bit of the Port A Function Register (PAFC). Resetting resets all bits of the register PAFC to "0" and sets all pins to be input port.
INTKEY Rising edge -ditection
Internal data bus
PA0~PA7 8 input OR
Reset KEY-ON ENABLE (on bit basis) PAFC write PA0 to PA7 (KI0 to KI7) PA read
Pull-up resistor
Figure 3.7.18 Port A
When PAFC = "1", if the input of any of KI0-KI7 pins falls down, an INTKEY interrupt is generated. An INTKEY interrupt can be used to release all HALT modes.
92CF26A-133
2007-11-21
TMP92CF26A
Port A register 7
PA (0028H) bit Symbol Read/Write System Reset State Hot Reset State PA7
6
PA6
5
PA5
4
PA4 R
3
PA3
2
PA2
1
PA1
0
PA0
Data from external port
-
Port A Function register 7
PAFC (002BH) bit Symbol Read/Write System Reset State Hot Reset State Function PA7F
6
PA6F
5
PA5F
4
PA4F W
3
PA3F
2
PA2F
1
PA1F
0
PA0F
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0: KEY IN disable
1: KEY IN enable
Port A Drive register 7
PADR (008AH) bit Symbol Read/Write System Reset State Hot Reset State Function PA7D
6
PA6D
5
PA5D
4
PA4D R/W
3
PA3D
2
PA2D
1
PA1D
0
PA0D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode
Note: A read-modify-write operation cannot be performed for PAFC.
Figure 3.7.19 Register for Port A
92CF26A-134
2007-11-21
TMP92CF26A 3.7.9 Port C (PC0 to PC7)
PC0 to PC7 are 8-bit general-purpose I/O port. Each bit can be set individually for input or output. Resetting sets Port C to an input port. It also sets all bits of the output latch register to "1". In addition to functioning as a general-purpose I/O port, Port C can also function as an input pin for timers (TA0IN, TA2IN), input pin for external interruption (INT0 to INT3), Extension address function (EA26, EA27, EA28) and output pin for Key (KO8). These settings are mode using the function register PCFC. The edge select for external interruption is determined by the IIMC register in the interruption controller. (1) PC0 (INT0), PC2 (INT2)
Reset
Direction control
PCCR write
Internal data bus
Function control
PCFC write S Output latch PC0 (INT0) PC2(INT2)
PCwrite S B Selector PC read INT0 INT2 A Level/edge selection and Rising/Falling selection IIMC
Figure 3.7.20 Port C0, C2
92CF26A-135
2007-11-21
TMP92CF26A
(2) PC1 (INT1, TA0IN), PC3 (INT3, TA2IN)
Reset
Direction control
PCCR write
Internal data bus
Function control
PCFCwrite S Output latch PC1 (INT1,TA0IN) PC3 (INT3, TA2IN)
PCwrite S B Selector PC read INT1 INT3 A Level/edge selection and Rising/Falling selection IIMC TA0IN TA2IN
Figure 3.7.21 Port C1,C3
92CF26A-136
2007-11-21
TMP92CF26A
(3) PC4 (EA26), PC5 (EA27), PC6 (EA28)
Reset
Direction control (on bit basis) PCCRwrite Function control (on bit basis) PCFC write S Output latch PC write EA26 EA27 EA28 S A
Selector
Internal data bus
PC4(EA26) PC5(EA27) PC6(EA28)
C SB Selector
PC read
A
Figure 3.7.22 Port C4, C5, C6 (4) PC7 (KO8)
Reset Direction control PCCR write Function control
PCFC write
Internal data bus
S Output latch PC write SB Selector PC read A
PC7(KO8) Open-drain enable
Figure 3.7.23 Port C7
92CF26A-137
2007-11-21
TMP92CF26A
Port C register 7
PC (0030H) bit Symbol Read/Write System Reset State Hot Reset State PC7
6
PC6
5
PC5
4
PC4 R/W
3
PC3
2
PC2
1
PC1
0
PC0
Data from external port (Output latch register is set to "1")
-
Port C control register 7
PCCR (0032H) bit Symbol Read/Write System Reset State Hot Reset State Function PC7C
6
PC6C
5
PC5C
4
PC4C W
3
PC3C
2
PC2C
1
PC1C
0
PC0C
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0: Input 1: Output
Port C function register 7
PCFC (0033H) bit Symbol Read/Write System Reset State Hot Reset State Function 0
-
6
PC6F
5
PC5F
4
PC4F W
3
PC3F
2
PC2F
1
PC1F
0
PC0F
PC7F
0
-
0
-
0
-
0
-
0
-
0
-
0
-
Refer to following table
Port C drive register 7
PCDR (008CH) bit Symbol Read/Write System Reset State Hot Reset State Function PC2 setting
0 1 0 1
6
PC6D
5
PC5D
4
PC4D R/W
3
PC3D
2
PC2D
1
PC1D
0
PC0D
PC7D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode PC1 setting
0 1 0 1
PC0 setting
0 1 0 1
Input port INT2
Output port Don't setting
Input port INT1
Output port TA0IN input
Input port INT0
Output port Don't setting
PC5 setting
0 1 0 1
PC4 setting
0 1 0 1
PC3 setting
0 1 0 1
Input port EA27 output
Output port Reserved
Input port EA26 output
Output port Reserved
Input port INT3
Output port TA2IN input
PC7 setting
0 1 0 1
PC6 setting
0 1 0 1
Input port Don't setting
Output port KO8output (Open-drain)
Input port EA28 output
Output port Reserved
Note 1: A read-modify-write operation cannot be performed for the registers PCCR, PCFC. Note 2: When setting PC3-PC0 pins to INT3-INT0 input, set PCDR to "0000"(prohibit input), and when driving PC3-PC0 pins to "0", execute HALT instruction. This setting generates INT3-INT0 inside. If don't use external interrupt in HALT condition, set like an interrupt don't generated. (e.g. change port setting)
Figure 3.7.24 Register for Port C
92CF26A-138
2007-11-21
TMP92CF26A 3.7.10 Port F (PF0 to PF5, PF7)
Ports F0 to F5 are 6-bit general-purpose I/O ports. Each bit can be set individually for input or output. Resetting sets PF0 to PF5 to be input ports. It also sets all bits of the output latch register to "1". In addition to functioning as general-purpose I/O port pins, PF0 to PF5 can also function as the output for I2S0, I2S1. A pin can be enabled for I/O by writing a "1" to the corresponding bit of the Port F Function Register (PFFC). Port F7 is a 1-bit general-purpose output port. In addition to functioning as general-purpose output port, PF7 can also function as the SDCLK output. Resetting sets PF7 to be an SDCLK output port. (1) Port F0 (I2S0CKO), Port F1 (I2S0DO), Port F2 (I2S0WS), Port F3 (I2S1CKO), Port F4 (I2S1DO), Port F5 (I2S1WS) Ports F0 to F5 are general-purpose I/O port. They also function as either I2S. Each pin is detailed below. I2Smode (I2S0Module)
PF0 I2S0CKO (Clock output) I2S0DO (Data output) I2S0WS (Word-select output) PF4
I2Smode (I2S1Module)
I2S1CKO (Clock output) I2S1DO (Data output) I2S1WS (Word-select output)
PF1 PF2
PF5 PF6
92CF26A-139
2007-11-21
TMP92CF26A
Reset Direction control (on bit basis) PFCR write
Internal data bus
Function control (on bit basis) PFFC write S Output latch PF write I2S0CKO output I2S1CKO output PF read A S PF0 (I2S0CKO) PF3 (I2S1CKO)
Selector B SB Selector A
Figure 3.7.25 Port F0, F3
Reset Direction control (on bit basis) PFCRwrite Function control (on bit basis)
Internal data bus
PFFC write S Output latch PF write I2S0DO,I2S1DO output I2S0WS,I2S1WS output A S PF1(I2S0DO) PF2(I2S0WS) PF4(I2S1DO) PF5(I2S1WS)
Selector B SB Selector PF read A
Figure 3.7.26 Port F1, F2, F4, F5
92CF26A-140
2007-11-21
TMP92CF26A
(2) Port F7 (SDCLK), Port F7 is general-purpose output port. In addition to functioning as general-purpose output port, PF7 can also function as the SDCLK output.
Reset
Internal data bus
Function control (on bit basis) PFFC write S Output latch SDCLK PF write AS Selector B PF7(SDCLK)
PF read
Figure 3.7.27 Port F7
92CF26A-141
2007-11-21
TMP92CF26A
Port F register 7
PF (003CH) bit Symbol Read/Write System Reset State Hot Reset State PF7 R/W 1
-
6
5
PF5
4
PF4
3
PF3 R/W
2
PF2
1
PF1
0
PF0
Data from external port (Output latch register is set to "1")
-
Port F control register 7
PFCR (003EH) bit Symbol Read/Write System Reset State Hot Reset State Function 0 - 0 - 0 -
6
5
PF5C
4
PF4C
3
PF3C W
2
PF2C
1
PF1C
0
PF0C
0 -
0 -
0 -
Refer to following table
Port F function register 7
PFFC (003FH) bit Symbol Read/Write System Reset State Hot Reset State Function PF7F W 1
-
0: Port 1: SDCLK
6
5
PF5F
4
PF4F
3
PF3F W
2
PF2F
1
PF1F
0
PF0F
0
-
0
-
0
-
0
-
0
-
0
-
Refer to following table
Port F drive register 7
PFDR (008FH) bit Symbol Read/Write System Reset State Hot Reset State Function PF2 setting
0 1 0 1
6
PF6D
5
PF5D
4
PF4D R/W
3
PF3D
2
PF2D
1
PF1D
0
PF0D
PF7D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode PF1 setting
0 1 0 1
PF0 setting
0 1 0 1
Input port Output port I2S0WS output
Input port Output port I2S0DO output
Input port Output port I2S0CKOoutput
PF5 setting
0 1 0 1
PF4 setting
0 1 0 1
PF3 setting
0 1 0 1
Input port Output port I2S1WS output
Input port Output port I2S1DO output
Input port Output port I2S1CKOoutput
Note : A read-modify-write operation cannot be performed for the registers PFCR, PFFC and PFFC2.
Figure 3.7.28 Register for Port F
92CF26A-142
2007-11-21
TMP92CF26A 3.7.11 Port G (PG0 to PG5)
PG0 to PG5 are 6-bit input ports and can also be used as the analog input pins for the internal AD converter. PG3 can also be used as the ADTRG pin for the AD converter. PG2 and PG3 can also be used as the MX and MY pins for a Touch screen interface. (PG) register is prohibited to access by byte. All the instruction (Arithmetic/Logical/ Bit operation and rotate/shift instruction) access by byte are prohibited. Word access is always needed.
Internal data bus
Port G read
PG0(AN0), PG1(AN1), PG2(AN2,MX), PG3(AN3,MY, ADTRG ) PG4(AN4) PG5(AN5)
Conversion Result Register
AD Converter
Channel Selector
AD read
ADTRG (for PG3 only)
(PG2,PG3 only) TSICR0
Switch for TSI Typ.10
TSICR0
Figure 3.7.29 Port G
92CF26A-143
2007-11-21
TMP92CF26A
Port G register 7
PG (0040H) Bit Symbol Read/Write System Reset State Hot Reset State
6
5
PG5
4
PG4
3
PG3 R
2
PG2
1
PG1
0
PG0
Data from external port
-
Note: The input channel selection of the AD converter and the permission of for ADTRG input are set by AD converter mode register ADMOD1.
Port G Function register 7
PGFC (0043H) Bit Symbol Read/Write System Reset State Hot Reset State Function
6
5
4
3
PG3F W 0
-
0: Input port or AN3 1: ADTRG
2
1
0
Port G driver register 7
PGDR (0090H) Bit Symbol Read/Write System Reset State Hot Reset State Function
6
5
4
3
PG3D R/W 1
-
2
PG2D
1
0
1
-
Input/Output buffer drive register for standby mode
Note 1: A read-modify-write operation cannot be performed for the registers PGFC. Note 2: PG register is prohibited to access by byte. All the instruction (Arithmetic/ Logical/ Bit operation and rotate/ shift instruction) access by byte are prohibited. Word access is always needed. Example: LD wa, (PG) : Using only "a" register data, and cancel "w" register data. Note 3: Don't use PG register at the state that mingles Analog input and Digital input.
Figure 3.7.30 Register for Port G
92CF26A-144
2007-11-21
TMP92CF26A 3.7.12 Port J (PJ0 to PJ7)
PJ0 to PJ4 and PJ7 are 6-bit output port. Resetting sets the output latch PJ to "1", and they output "1". PJ5 to PJ6 are 2-bit input/output port. In addition to functioning as a port, Port J also functions as output pins for SDRAM ( SDRAS , SDCAS , SDWE , SDLLDQM, SDLUDQM, and SDCKE), SRAM ( SRWR , SRLLB and SRLUB ) and NAND-Flash(NDALE and NDCLE). The above settings are made using the function register PJFC. However, either SDRAM or SRAM output signal for PJ0 to PJ2 are selected automatically according to the setting of the memory controller.
Reset
Function control2 (on bit basis) PJFC2 write Function control (on bit basis) PJFC write Selector Selector
Internal data bus
S PJ0( SDRAS , SRLLB ) PJ1 ( SDCAS , SRLUB ) PJ2( SDWE , SRWR ) PJ3(SDLLDQM) PJ4(SDLUDQM) PJ7(SDCKE)
PJ write
SRLLB , SRLUB , SRWR
PJ read
SDRAS , SDCAS , SDWE , SDLLDQM, SDLUDQM, SDCKE
Figure 3.7.31 Port J0 to J4 and J7
92CF26A-145
2007-11-21
TMP92CF26A
Reset Direction control PJCR write Function control
Internal data bus
PJFC write S Output latch PJ write NDALE, NDCLE output A S PJ5 (NDALE), PJ6 (NDCLE)
Selector B SB Selector PJ read A
Figure 3.7.32 Port J5,J6
92CF26A-146
2007-11-21
TMP92CF26A
Port J register 7
PJ bit Symbol PJ7 (004CH) Read/Write System Reset State
6
PJ6
5
PJ5
4
PJ4 R/W
3
PJ3
2
PJ2
1
PJ1
0
PJ0
Data from external port 1
-
(Output latch register is set to "1")
-
1
-
1
-
1
-
1
-
1
-
Hot Reset State
Port J control register 7
PJCR (004EH) bit Symbol Read/Write System Reset State Hot Reset State Function
6
PJ6C W 0
-
5
PJ5C
4
3
2
1
0
0
-
0: Input, 1: Output
Port J function register 7
PJFC (004FH) bit Symbol Read/Write System Reset State Hot Reset State Function PJ7F
6
PJ6F
5
PJ5F
4
PJ4F W
3
PJ3F
2
PJ2F
1
PJ1F
0
PJ0F
0
-
0
-
0
-
0
-
0: Port 1:SDLUDQM
0
-
0: Port 1:SDLLDQM
0
-
0
-
0
-
0: Port 1: SDCKE
0: Port 1: NDCLE
0: Port 1: NDALE
0: Port 1: SDWE ,
SRWR
0: Port 0: Port 1: SDCAS , 1: SDRAS ,
SRLUB SRLLB
Port J drive register 7
PJDR (0093H) bit Symbol Read/Write System Reset State Hot Reset State Function PJ7D
6
PJ6D
5
PJ5D
4
PJ4D R/W
3
PJ3D
2
PJ2D
1
PJ1D
0
PJ0D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode
Note: A read-modify-write operation cannot be performed for the registers PJCR and PJFC.
Figure 3.7.33 Register for Port J
92CF26A-147
2007-11-21
TMP92CF26A 3.7.13 Port K (PK0 to PK7)
PK0 to PK7 are 8-bit output ports. Resetting sets the output latch PK to "0", and PK0 to PK7 pins output "0". In addition to functioning as an output port function, port K also functions as output pins for an LCD controller (LCP0, LHSYNC, LLOAD, LFR, LVSYNC, and LGOE0 to LGOE2). The above settings are made using the function register PKFC.
Reset
Function control (on bit basis) PKFC write S Output latch
Selector
A B
Output buffer
PK write LCP0, LLOAD, LFR, LVSYNC, LHSYNC,LGOE0 to LGOE2 PK read
PK0 (LCP0) PK1 (LLOAD) PK2 (LFR) PK3 (LVSYNC) PK4 (LHSYNC) PK5 (LGOE0) PK6 (LGOE1) PK7 (LGOE2)
Internal data bus
Figure 3.7.34 Port K0 to K7
92CF26A-148
2007-11-21
TMP92CF26A
Port K register 7
PK (0050H) bit Symbol Read/Write System Reset State Hot Reset State PK7
6
PK6
5
PK5
4
PK4 R/W
3
PK3
2
PK2
1
PK1
0
PK0
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
Port K function register 7
PKFC (0053H) bit Symbol Read/Write System Reset State Hot Reset State Function PK7F
6
PK6F
5
PK5F
4
PK4F W
3
PK3F
2
PK2F
1
PK1F
0
PK0F
0
-
0
-
0
-
0
-
0:Port 1: LHSYNC
0
-
0: Port 1: LVSYNC
0
-
0
-
0
-
0:Port 1:LGOE2
0:Port 1:LGOE1
0:Port 1:LGOE0
0: Port 1: LFR
0: Port 1: LLOAD
0: Port 1: LCP0
Port K drive register 7
PKDR (0094H) bit Symbol Read/Write System Reset State Hot Reset State Function PK7D
6
PK6D
5
PK5D
4
PK4D R/W
3
PK3D
2
PK2D
1
PK1D
0
PK0D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode
Note: A read-modify-write operation cannot be performed for the registers PKFC.
Figure 3.7.35 Register for Port K
92CF26A-149
2007-11-21
TMP92CF26A 3.7.14 Port L (PL0 to PL7)
PL0 to PL7 are 8-bit output ports. Resetting sets the output latch PL to "0", and PL0 to PL7 pins output "0". In addition to functioning as a general-purpose output port, port L can also function as a data bus for an LCD controller (LD0 to LD7). The above settings are made using the function register PLFC.
Reset
Function control
Internal data bus
PLFC write R Output latch PL write LD0 to LD7 PL read
A
S PL0 to PL7 (LD0 to LD7)
Selector B
Figure 3.7.36 Port L0 to L7
92CF26A-150
2007-11-21
TMP92CF26A
Port L register 7
PL bit Symbol PL7 (0054H) Read/Write System Reset State Hot Reset State
6
PL6
5
PL5
4
PL4 R/W
3
PL3
2
PL2
1
PL1
0
PL0
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
Port L function register 7
PLFC bit Symbol PL7F (0057H) Read/Write System Reset State Hot Reset State Function
6
PL6F
5
PL5F
4
PL4F W
3
PL3F
2
PL2F
1
PL1F
0
PL0F
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0: Port
1: Data bus for LCDC (LD7 toLD0)
Port L drive register 7
PLDR bit Symbol PL7D (0095H) Read/Write System Reset State Hot Reset State Function
6
PL6D
5
PL5D
4
PL4D R/W
3
PL3D
2
PL2D
1
PL1D
0
PL0D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode
Note: A read-modify-write operation cannot be performed for the registers PLFC.
Figure 3.7.37 Register for Port L
92CF26A-151
2007-11-21
TMP92CF26A 3.7.15 Port M (PM1, PM2, PM7)
PM1, PM2 and PM7 are 3-bit output ports. Resetting sets the output latch PM to "1", and PM1, PM2 and PM7 pins output "1". In addition to functioning as an output ports, port M also functions as output pin for the timers (TA1OUT), output pins for the RTC alarm ( ALARM ), and as the output pin for the melody/alarm generator (MLDALM, MLDALM ) and as the Power control pin (PWE). The above settings are made using the function register PMFC. PM1 has two output function which MLDALM and TA1OUT, and PM2 has two output functions ALARM and MLDALM . These are selected using PM, PM.
Reset Function control
PMFC write
Internal data bus
S Output latch
S A Selector B
PM write PM read TA1OUT MLDALM A S
PM1 (MLDALM, TA1OUT)
Selector B
Figure 3.7.38 Port M1
92CF26A-152
2007-11-21
TMP92CF26A
Reset Function control (on bit basis) PMFC write
Internal data bus
S Output latch
S A Selector B
PM write PM read
MLDALM ALARM
PM2 ( ALARM , MLDALM )
A
S
Selector B
Figure 3.7.39 Port M2
Reset Function control (on bit basis) PMFC write S Output latch S A Selector B
Internal data bus
PM7 (PWE)
PM write PM read PWE
Figure 3.7.40 Port M7
92CF26A-153
2007-11-21
TMP92CF26A
Port M register 7
PM (0058H) bit Symbol Read/Write System Reset State Hot Reset State PM7 R/W 1
-
6
5
4
3
2
PM2 R/W 1
-
1
PM1
0
1
-
Port M function register 7
PMFC (005BH) bit Symbol Read/Write System Reset State Hot Reset State Function PM7F W 0
-
6
5
4
3
2
PM2F W 0
-
0: Port 1: ALARM at =1,
MLDALM
1
PM1F
0
0
-
0: Port 1: MLDALM at =1, TA1OUT at =0
0: Port 1: PWE
at =0
Port M drive register 7
PMDR (0096H) bit Symbol Read/Write System Reset State Hot Reset State Function PM7D R/W 1
-
6
5
4
3
2
PM2D R/W 1
-
1
PM1D
0
1
-
Input /Output buffer drive register for standby mode
Input/Output buffer drive register for standby mode
Note: A read-modify-write operation cannot be performed for the registers PMFC.
Figure 3.7.41 Register for Port M
92CF26A-154
2007-11-21
TMP92CF26A 3.7.16 Port N (PN0 to PN7)
PN0 to PN7 are 8-bit general-purpose I/O port. Each bit can be set individually for input or output. Resetting sets Port N to an input port. In addition to functioning as a general-purpose I/O port, Port N can also function as key-board interface pin (KO0 to KO7) which can be set to open-drain output buffer.
Reset Direction control (on bit basis) PNCR write Function control (on bit basis) PNFC write S Output latch PN write SB Selector PC read A PN0(KO0) to PN7(KO7) Open-drain enable
Internal data bus
Figure 3.7.42 Port N
92CF26A-155
2007-11-21
TMP92CF26A
Port N register 7
PN (005CH) bit Symbol Read/Write System Reset State Hot Reset State PN7
6
PN6
5
PN5
4
PN4 R/W
3
PN3
2
PN2
1
PN1
0
PN0
Data from external port (Output latch register is set to "1") -
Port N control register 7
PNCR (005EH) bit Symbol Read/Write System Reset State Hot Reset State Function PN7C
6
PN6C
5
PN5C
4
PN4C W
3
PN3C
2
PN2C
1
PN1C
0
PN0C
0 -
0 -
0 -
0 - 0: Input
0 - 1: Output
0 -
0 -
0 -
Port N function register 7
PNFC (005FH) bit Symbol Read/Write System Reset State Hot Reset State Function PN7F
6
PN6F
5
PN5F
4
PN4F W
3
PN3F
2
PN2F
1
PN1F
0
PN0F
0 -
0 -
0 -
0 -
0 -
0 -
0 -
0 -
0: CMOS output
1: Open-drain output
Port N drive register 7
PNDR (0097H) bit Symbol Read/Write System Reset State Hot Reset State Function PN7D
6
PN6D
5
PN5D
4
PN4D R/W
3
PN3D
2
PN2D
1
PN1D
0
PN0D
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
Input/Output buffer drive register for standby mode
Note : A read-modify-write operation cannot be performed for the registers PNCR and PNFC.
Figure 3.7.43 Register for Port N
92CF26A-156
2007-11-21
TMP92CF26A 3.7.17 Port P (PP1 to PP7)
Ports P1 to P5 are 6-bit general-purpose I/O ports. Each bit can be set individually for input or output. Resetting sets port P1 to P5 to input port and output latch to "0". In addition to functioning as general-purpose I/O port, P0 to P5 can also function as an output pin for timers (TA3OUT, TA5OUT, TA7OUT), as an input pin for timers (TB0IN0, TB1IN0), and as an input pin for external interruption (INT5 to INT7). Port P6 and P7 are 2-bit output port. Resetting sets output latch to "0". In addition to functioning as an output port, PP6 and PP7 can also function as an output pin for timers (TB0OUT0, TB1OUT1). Setting in the corresponding bits of PPCR and PPFC enables the respective functions. The edge select for external interruption is determined by the IIMC register in the interruption controller. In port setting, if 16 bit timer input is selected and capture control is executed, INT6 and INT7 don't depend on IIMC1 register setting. INT6 and INT7 operate by setting TBnMOD.
Reset Direction control (on bit basis) PPCR write Internal data bus Function control (on bit basis) PPFC write R Output latch PP write TA3OUT output TA5OUT output A S PP1 (TA3OUT) PP2 (TA5OUT)
Selector B SB Selector PP read A
Figure 3.7.44 Port P1, P2
92CF26A-157
2007-11-21
TMP92CF26A
Reset Direction control (on bit basis) PPCR write Function control (on bit basis) PPFC write R Output latch PP write TA7OUT SB Selector PP read A Level/edge selection and Rising/Falling selection IIMC A S PP3 (INT5, TA7OUT)
Internal data bus
Selector B
INT5
Figure 3.7.45 Port P3
Reset
Direction control (on bit basis)
PPCR write Internal data bus Function control (on bit basis)
PPFC write R Output latch PP4 (INT6,TB0IN0) PP5 (INT7, TB1IN0)
PP write S B Selector PP read INT6 INT7 (from TMRB0) INT6 (from TMRB1) INT7 TB0IN0 TB1IN0 A Level/edge selection and Rising/Falling selection IIMC
Figure 3.7.46 Port P4,P5
92CF26A-158
2007-11-21
TMP92CF26A
Reset Function control (on bit basis) PPFC write R Output latch PP write TB0OUT0 output TB1OUT0 output A S PP6 (TB0OUT0) PP7 (TB1OUT0)
Internal data bus
Selector B
Figure 3.7.47 Port P6, P7
92CF26A-159
2007-11-21
TMP92CF26A
Port P register 7
PP (0060H) bit Symbol Read/Write System Reset State Hot Reset State PP7
6
PP6
5
PP5
4
PP4 R/W
3
PP3
2
PP2
1
PP1
0
0 -
0 -
Data from external port (Output latch register is cleared to "0") -
Port P control register 7
PPCR (0062H) bit Symbol Read/Write System Reset State Hot Reset State Function
6
5
PP5C
4
PP4C
3
PP3C W
2
PP2C
1
PP1C
0
0 -
0 -
0 - 0: Input 1: Output
0 -
0 -
Port P function register 7
PPFC (0063H) bit Symbol Read/Write System Reset State Hot Reset State Function PP7F
6
PP6F
5
PP5F
4
PP4F W
3
PP3F
2
PP2F
1
PP1F
0
0 -
0:Port 1:TB1OUT0
0 -
0:Port 1:TB0OUT0
0 -
0 -
0 - Refer to following table
0 -
0 -
Port P drive register 7
PPDR (0098H) bit Symbol Read/Write System Reset State Hot Reset State Function PP3 setting
0 1
6
PP6D
5
PP5D
4
PP4D R/W
3
PP3D
2
PP2D
1
PP1D
0
PP7D
1 -
1 -
1 -
1 -
1 -
1 -
1 -
Input/Output buffer drive register for standby mode PP2 setting
0 1 0 Input port Reserved 1 Output port TA5OUT output
PP1 setting
0 1 0 Input port Reserved 1 Output port TA3OUT output
0 1
Input port INT5 input
Output port TA7OUT output
PP5 setting
0 1 0 Input port INT7 input 1 Output port TB1IN0 input
PP4 setting
0 1 0 Input port INT6 input 1 Output port TB0IN0 input
Note1: A read-modify-write operation cannot be performed for the registers PPCR, PPFC. Note2: When setting PP5, PP4, PP3 pins to INT7,INT6,INT5 input, set PPDR to "0000" (prohibit input), and when driving PP5,PP4,PP3 pins to "0", execute HALT instruction. This setting generates INT7, INT6, and INT5 inside. If don't using external interrupt in HALT condition, set like an interrupt don't generated.
Figure 3.7.48 Register for Port P
92CF26A-160
2007-11-21
TMP92CF26A 3.7.18 Port R (R0 to R3)
Ports R0 to R3 are 4-bit general-purpose I/O ports. Each bit can be set individually for input or output. Resetting sets port R0 to R3 to input port and output latch to "0". In addition to functioning as general-purpose I/O port, PR0 to PR3 can also function as the SPI controller pin (SPCLK, SPCS , SPDO and SPDI). Setting in the corresponding bits of PFCR and PFFC enables the respective functions.
Reset
SPICT
Direction control (on bit basis) PRCR write Function control (on bit basis) PRFC write R Output latch PR write SB Selector PR read SPDI input A PR0(SPDI)
Internal data bus
Figure 3.7.49 Port R0
92CF26A-161
2007-11-21
TMP92CF26A
Reset SPICT
Direction control (on bit basis) PRCR write Function control (on bit basis) PRFC write R Output latch PR write SPDO, SPCS , SPCLK PR read S A Selector B SB Selector A PR1(SPDO), PR2( SPCS ), PR3(SPCLK)
Internal data bus
Figure 3.7.50 Port R1 to R3
92CF26A-162
2007-11-21
TMP92CF26A
Port R register 7
PR (0064H) bit Symbol Read/Write System Reset State Hot Reset State
6
5
4
3
PR3
2
PR2 R/W
1
PR1
0
PR0
Data from external port (Output latch register is cleared to "0") -
Port R control register 7
PRCR (0066H) bit Symbol Read/Write System Reset State Hot Reset State Function
6
5
4
3
PR3C
2
PR2C W
1
PR1C
0
PR0C
0 -
0 -
0 -
0 -
0: Input, 1: Output
Port R function register 7
PRFC (0067H) bit Symbol Read/Write System Reset State Hot Reset State Function
6
5
4
3
PR3F
2
PR2F W
1
PR1F
0
PR0F
0 -
0: Port 1: SPCLK
0 -
0: Port 1: SPCS
0 -
0: Port 1: SPDO
0 -
0: Port 1: SPDI
Port R drive register 7
PRDR bit Symbol (0099H) Read/Write System Reset State Hot Reset State Function
6
5
4
3
PR3D
2
PR2D R/W
1
PR1D
0
PR0D
1 -
1 -
1 -
1 -
Input/Output buffer drive register for standby mode
PR1 setting
0 1 0 1
PR0 setting
0 1 0 1
Input port Reserved
Output port SPDO output
Input port SPDI input
Output port Reserved
PR3setting
0 1 0 1
PR2 setting
0 1 0 1
Input port Reserved
Output port SPCLK output
Input port Reserved
Output port
SPCS
Output
Note: A read-modify-write operation cannot be performed for the registers PRCR, PRFC.
Figure 3.7.51 Register for Port R
92CF26A-163
2007-11-21
TMP92CF26A 3.7.19 Port T (PT0 to PT7)
Ports T0 to T7 are 8-bit general-purpose I/O ports. Each bit can be set individually for input or output. Resetting sets ports T0 to T7 to input port and output latch to "0". In addition to functioning as general-purpose I/O port, PT0 to PT7 can also function as a data bus pin for LCD controller (LD8 to LD15). Setting in the corresponding bits of PTCR and PTFC enables the respective functions.
Reset Direction control (on bit basis) PTCR write Function control (on bit basis) PTFC write S Output latch PT write LD8 to LD15
Internal data bus
A
S PT0 to PT7 (LD8 to LD15)
Selector B
SB Selector PT read A
Figure 3.7.52 Port T0 to T7
92CF26A-164
2007-11-21
TMP92CF26A
Port T register 7
PT bit Symbol PT7 (00A0H) Read/Write System Reset State Hot Reset State
6
PT6
5
PT5
4
PT4 R/W
3
PT3
2
PT2
1
PT1
0
PT0
Data from external port (Output latch register is cleared to "0") -
Port T control register 7
PTCR bit Symbol PT7C (00A2H) Read/Write System Reset State Hot Reset State Function
6
PT6C
5
PT5C
4
PT4C W
3
PT3C
2
PT2C
1
PT1C
0
PT0C
0 -
0 -
0 -
0 -
0 -
0 -
0 -
0 -
0: Input 1: Output
Port T function register 7
PTFC bit Symbol PT7F (00A3H) Read/Write System Reset State Hot Reset State Function
6
PT6F
5
PT5F
4
PT4F W
3
PT3F
2
PT2F
1
PT1F
0
PT0F
0 -
0 -
0 - 0: Port
0 -
0 -
0 -
0 -
0 -
1: Data bus for LCDC (LD15 to LD8)
Port T drive register 7
PTDR bit Symbol PT7D (009BH) Read/Write System Reset State Hot Reset State Function
6
PT6D
5
PT5D
4
PT4D R/W
3
PT3D
2
PT2D
1
PT1D
0
PT0D
1 -
1 -
1 -
1 -
1 -
1 -
1 -
1 -
Input/Output buffer drive register for standby mode
Note1: A read-modify-write operation cannot be performed for the registers PTCR, PTFC. Note2: When PT is used as LD15 to LD8, set applicable PTnC to"1".
Figure 3.7.53 Register for Port T
92CF26A-165
2007-11-21
TMP92CF26A 3.7.20 Port U (PU0 to PU7)
Ports U0 to U7 are 8-bit general-purpose I/O ports. Each bit can be set individually for input or output. Resetting sets port U0 to U7 to input port and output latch to "0". In addition to functioning as general-purpose I/O port, PU0 to PU7 can also function as a data bus pin for LCD controller (LD16 to LD23) and as the SDCLK input function. Setting in the corresponding bits of PUCR and PUFC enables the respective functions. In addition to functioning as above function, PU7 can also function as the communication for debug mode (EO_TRGOUT). These functions are operated when it is started in debug mode. In this case, PU7 can not be used as LD23 function.
Reset Direction control (on bit basis) PUCR write Function control (on bit basis) PUFC write R Output latch PU write LD16 to LD20, LD22,LD23 EO_TRGOUT
Debug mode
Internal data bus
A
S PU0~PU4,PU6 (LD16 to LD20,LD22) PU7 (LD23,EO_TRGOUT)
Selector B C
SB Selector PU read A
Figure 3.7.54 Port U0 to U4 , U6 , U7
92CF26A-166
2007-11-21
TMP92CF26A
Reset Direction control (on bit basis) PUCR wirte Function control (on bit basis) Internal data bus PUFC write R Output latch PU write LD21 SB Selector PU read A
AS Selector B PU5 (LD21)
Figure 3.7.55 Port U5
92CF26A-167
2007-11-21
TMP92CF26A
Port U register 7
PU (00A4H) Bit Symbol Read/Write System Reset State Hot Reset State PU7
6
PU6
5
PU5
4
PU4 R/W
3
PU3
2
PU2
1
PU1
0
PU0
Data from external port (Output latch register is cleared to "0") -
Port U control register 7
PUCR (00A6H) Bit Symbol Read/Write System Reset State Hot Reset State Function PU7C
6
PU6C
5
PU5C
4
PU4C W
3
PU3C
2
PU2C
1
PU1C
0
PU0C
0 -
0 -
0 -
0 -
0 -
0 -
0 -
0 -
0: Input 1: Output
Port U function register 7
PUFC (00A7H) Bit Symbol Read/Write System Reset State Hot Reset State Function PU7F
6
PU6F
5
PU5F
4
PU4F W
3
PU3F
2
PU2F
1
PU1F
0
PU0F
0 - 0: Port 1: LD23
0 - 0: Port 1: LD22
0 - 0: Port
1: LD21@ =1
0 - 0: Port 1: LD20
0 - 0: Port 1: LD19
0 - 0: Port 1: LD18
0 - 0: Port 1: LD17
0 - 0: Port 1: LD16
Note: When PU is used as LD23 to LD16, set applicable PUnC to "1".
Port U drive register 7
PUDR (009CH) Bit Symbol Read/Write System Reset State Hot Reset State Function PU7D
6
PU6D
5
PU5D
4
PU4D R/W
3
PU3D
2
PU2D
1
PU1D
0
PU0D
1 -
1 -
1 -
1 -
1 -
1 -
1 -
1 -
Input/Output buffer drive register for standby mode
Note1: A read-modify-write operation cannot be performed for the registers PUCR, PUFC. Note2: When use PU as LD23 to LD16, set PUnC to "1". When use PU5 as LD21, set PU5C to "1".
Figure 3.7.56 Register for Port U
92CF26A-168
2007-11-21
TMP92CF26A 3.7.21 Port V (PV0 to PV4, PV6, PV7)
Ports V0 to V2, V6 and V7 are 5-bit general-purpose I/O ports. Each bit can be set individually for input or output. Resetting sets port V0 to V2, V6 and V7 to input port and output latch to "0". In addition to functioning as general-purpose I/O port, PV can also function as a input or output pin for SBI (SDA, SCL) and an output for SIO(SCLK0) (Note). Setting in the corresponding bits of PVCR and PVFC enables the respective functions. Ports V3 and V4 are 2-bit general-purpose output ports. Resetting clear ports V3 and V4 to output latch to "0".
Reset
Direction control (on bit basis) PVCR write
Internal data bus
Function control (on bit basis) PVFC write R Output latch A S
Selector PV write SCLK0 output SB Selector A PV read B
PV0 (SCLK0) PV1 PV2
Note: SIO function support function that input clock from SCLK0, basically. However, if setting to PV0 pin, this function supports only the output function.
Figure 3.7.57 Port V0 to V2
92CF26A-169
2007-11-21
TMP92CF26A
Reset Internal data bus
R Output latch
PV3 PV4
PV write PV read
Figure 3.7.58 Port V3, V4
Reset
Direction control (on bit basis) PVCR write Function control (on bit basis) PVFC write R Output latch PV write SDA,SCL output A S PV6(SDA)
Open-drain enable PVFC2
Internal data bus
Selector B
PV7(SCL)
SB Selector
PV read SDA,SCL input
A
Figure 3.7.59 Port V6, V7
92CF26A-170
2007-11-21
TMP92CF26A
Port V register 4
PV4
7
PV bit Symbol PV7 (00A8H) Read/Write System Reset State Hot Reset State
6
PV6
5
3
PV3
2
PV2 R/W
1
PV1
0
PV0
R/W Data from external port (Output latch register is cleared to "0") -
Data from external port (Output latch register is cleared to "0") -
7
PVCR bit Symbol PV7C (00AAH) Read/Write System Reset State Hot Reset State Function
6
PV6C
Port V control register 5 4 3
2
PV2C
1
PV1C W
0
PV0C
0 -
0 -
0 -
0 - 0: Input 1: Output
0 -
0: Input 1: Output
7
PVFC (00ABH) bit Symbol Read/Write System Reset State Hot Reset State Function PV7F W 0 -
6
PV6F
Port V function register 5 4 3
2
PV2F
1
PV1F W
0
PV0F
0 -
0 -
0 - Refer to following table
0 -
Refer to following table
7
PVFC2 (00A9H) bit Symbol Read/Write System Reset State Hot Reset State Function PV7F2 W 0 -
0: CMOS 1: Open -drain
6
PV6F2
Port V function register 2 5 4 3
2
1
0
0 -
0: CMOS 1: Open -drain
7
PVDR bit Symbol PV7D R/W 1 - (009DH) Read/Write System Reset State Hot Reset State Function PV2 setting

6
PV6D
Port V drive register 5 4 3
PV4D PV3D
2
PV2D R/W
1
PV1D
0
PV0D
1 -
1 -
1 -
1 -
1 -
1 -
Input/Output buffer drive register for standby mode PV1 setting PV0 setting 0 Input port Reserved 1 Output port Reserved

0 Input port Reserved
1 Output port Reserved

0 Input port Reserved
1 Output port SCLK0 output
0 1 PV7 setting

0 1 PV6 setting
0 1
Note: SCLK0 is only output. 0 Input port Reserved 1 Output port SDA I/O
0 Input port Reserved
1 Output port SCL I/O

0 1
0 1
Note: A read-modify-write operation cannot be performed for the registers PVCR, PVFC and PVFC2.
Figure 3.7.60 Register for Port V
92CF26A-171
2007-11-21
TMP92CF26A 3.7.22 Port W (PW0 to PW7)
Ports W0 to W7 are 8-bit general-purpose I/O ports. Each bit can be set individually for input or output. Resetting sets ports W0 to W7 to input port and output latch to "0". Setting in the corresponding bits of PWCR and PWFC enables the respective functions.
Reset
Direction control (on bit basis) PWCR write Function control (on bit basis) PWFC write R Output latch PW write SB Selector PW read A PW0 to PW7
Internal data bus
Figure 3.7.61 Port W0 to W7
92CF26A-172
2007-11-21
TMP92CF26A
Port W register 7
PW (00ACH) bit Symbol Read/Write System Reset State Hot Reset State PW7
6
PW6
5
PW5
4
PW4 R/W
3
PW3
2
PW2
1
PW1
0
PW0
Data from external port (Output latch register is cleared to "0") -
Port W control register 7
PWCR (00AEH) bit Symbol Read/Write System Reset State Hot Reset State Function PW7C
6
PW6C
5
PW5C
4
PW4C W
3
PW3C
2
PW2C
1
PW1C
0
PW0C
0 -
0 -
0 -
0 -
0 -
0 -
0 -
0 -
0: Input 1: Output
Port W function register 7
PWFC (00AFH) bit Symbol Read/Write System Reset State Hot Reset State Function PW7F
6
PW6F
5
PW5F
4
PW4F W
3
PW3F
2
PW2F
1
PW1F
0
PW0F
0 -
0 -
0 -
0 - 0: Port
0 - 1: Reserved
0 -
0 -
0 -
Port W drive register 7
PWDR (009EH) bit Symbol Read/Write System Reset State Hot Reset State Function PW7D
6
PW6D
5
PW5D
4
PW4D R/W
3
PW3D
2
PW2D
1
PW1D
0
PW0D
1 -
1 -
1 -
1 -
1 -
1 -
1 -
1 -
Input/Output buffer drive register for standby mode
Note2: A read-modify-write operation cannot be performed for the registers PWCR, PWFC.
Figure 3.7.62 Register for Port W
92CF26A-173
2007-11-21
TMP92CF26A 3.7.23 Port X (PX4, PX5 and PX7)
Ports X5 and X7 are 2-bit general-purpose I/O ports. Each bit can be set individually for input or output. Resetting sets ports X5 and X7 to input port and output latch to "0". In addition to functioning as general-purpose I/O port, PX5 and PX7 can also function as the USB clock input pin (X1USB). Setting in the corresponding bits of PXCR and PXFC enables the respective functions. Port X4 is 1-bit general-purpose output port. Resetting sets output latch to "0". In addition to functioning as general-purpose output port, PX4 can also function as a system clock output pin (CLKOUT) and as an output pin (LDIV). Setting in the corresponding bits of PX and PXFC enables the respective functions.
Reset Function control (on bit basis) PXFC write R Output latch A PX write
Internal data bus
S PX4 (CLKOUT) (LDIV)
Selector B
PX read CLKOUT output A S
Selector LDIV output B
Figure 3.7.63 Port X4
92CF26A-174
2007-11-21
TMP92CF26A
Reset
Direction control (on bit basis) PXCR write Function control (on bit basis) PXFC write R Output latch PX write SB Selector PX read X1USB input A PX5 (X1USB) PX7
Internal data bus
Figure 3.7.64 Port X5, X7
92CF26A-175
2007-11-21
TMP92CF26A
Port X register 7
PX bit Symbol System Reset State Hot Reset State PX7 R/W (00B0H) Read/Write
6
5
PX5 R/W
4
PX4 Note2)
3
2
1
0
Data from external port (Output latch register is cleared to "0") -
Port X control register 7
PXCR bit Symbol PX7C W 0 - 0: Input 1: Output (00B2H) Read/Write System Reset State Hot Reset State Function
6
5
PX5C W 0 - 0: Input 1: Output
4
3
2
1
0
Port X function register 7
PXFC bit Symbol PX7F W 0 -
0:Port 1:Reserved
6
5
PX5F W 0 -
0:Port 1:X1USB input
4
PX4F
3
2
1
0
(00B3H) Read/Write System Reset State Hot Reset State Function
0 -
Refer to following table
Port X drive register 7
PXDR bit Symbol PXD7 R/W 1 - 1 - Input/Output buffer drive register for standby mode Note 1: A read-modify-write operation cannot be performed for the registers PXCR, PXFC. Note 2: When PXFC= "1", Function is changed by PX setting. Refer to following PX4 setting table. PX4 setting 0 1 0 Output port CLKOUT output LDIV output 1 (009FH) Read/Write System Reset State Hot Reset State Function
6
5
PXD5 R/W
4
PXD4
3
2
1
0
1 -
Figure 3.7.65 Register for Port X
92CF26A-176
2007-11-21
TMP92CF26A 3.7.24 Port Z (PZ0 to PZ7)
Ports Z0 to Z7 are 8-bit general-purpose I/O ports. Each bit can be set individually for input or output. Resetting sets ports Z0 to Z7 to input port and output latch to "0". In addition to functioning as general-purpose I/O port, ports Z can also function as a communication pin for debug mode (EI_PODDATA, EI_SYNCLK, EI_PODREQ, EI_REFCLK, EI_TRGIN, EI_COMRESET, EO_MCUDATA and EO_MCUREQ). These functions are operated when it is started in debug mode. (There is not Function register in this port. When DBGE is set to "0", this port is set to debug communication function.)
Reset
Debug mode
Direction control (on bit basis) PZCR write Internal data bus
R Output latch PZ write
PZ0 (EI_PODDATA) PZ1 (EI_SYNCLK) PZ2 (EI_PODREQ) PZ3 (EI_REFCLK) PZ4 (EI_TRGIN) PZ5 (EI_COMRESET) SB Selector
PZ read
A
EI_PODDATA EI_SYNCLK EI_PODREQ EI_REFCLK EI_TRGIN EI_COMRESET
Figure 3.7.66 Port Z0 to Z5
92CF26A-177
2007-11-21
TMP92CF26A
Reset
Debug mode
Direction control (on bit basis) PZCR write
Internal data bus
R Output latch PZ write EO_MCUDATA EO_MCUREQ
A
S PZ6(EO_MCUDATA) PZ7(EO_MCUREQ)
Selector B
SB Selector PZ read A
Figure 3.7.67 Port Z6 to Z7
92CF26A-178
2007-11-21
TMP92CF26A
Port Z register 7
PZ bit Symbol PZ7 (0068H) Read/Write System Reset State Hot Reset State
6
PZ6
5
PZ5
4
PZ4 R/W
3
PZ3
2
PZ2
1
PZ1
0
PZ0
Data from external port (Output latch register is cleared to "0") -
Port Z control register 7
PZCR bit Symbol PZ7C (006AH) Read/Write System Reset State Hot Reset State Function
6
PZ6C
5
PZ5C
4
PZ4C W
3
PZ3C
2
PZ2C
1
PZ1C
0
PZ0C
0 -
0 -
0 -
0 -
0 -
0 -
0 -
0 -
0: Input 1: Output
Port Z drive register 7
PZDR bit Symbol PZ7D (009AH) Read/Write System Reset State Hot Reset State Function
6
PZ6D
5
PZ5D
4
PZ4D R/W
3
PZ3D
2
PZ2D
1
PZ1D
0
PZ0D
1 -
1 -
1 -
1 -
1 -
1 -
1 -
1 -
Input/Output buffer drive register for standby mode
Note: A read-modify-write operation cannot be performed for the registers PZCR.
Figure 3.7.68 Register for Port Z
92CF26A-179
2007-11-21
TMP92CF26A
3.8
Memory Controller (MEMC)
Functional Overview
3.8.1
The TMP92CF26A has a memory controller with the following features to control four programmable address spaces: (1) Four programmable address spaces The MEMC can specify a start address and a block size for each of the four memory spaces (CS0 to CS3 spaces). * SRAM or ROM: All CS spaces (CS0 to CS3) can be assigned. * SDRAM: Either the CS1 or CS2 space can be assigned. * Page-ROM: Only the CS2 space can be assigned. * NAND-Flash: It is not required to setup the CS lines. However, when using NAND-Flash, set the BROMCR bit to 1 to assign an external area to avoid data conflicts with CS spaces. (2) Memory specification The MEMC can specify the type of memory, SRAM, ROM, SDRAM to associate with the selected address spaces. (3) Data bus width specification The data bus width is selectable from 8 and 16 bits for the respective chip select spaces. (4) Wait control The number of wait states to be inserted into an external bus cycle is determined by the wait state bits of the control register and the WAIT input pin. The number of wait states of a read cycle and that of a write cycle can be specified individually. The number of wait states can be selected from the following 15 options:
0 to 10 wait states, 12 wait states, 16 wait states, 20 wait states 4+N wait states (controlled by the WAIT pin)
92CF26A-180
2007-11-21
TMP92CF26A 3.8.2 Control Rregisters and Memory Access Operations After Reset
This section describes the registers to control the memory controller, their reset states and the necessary settings after reset. (1) Control Registers The control registers of the memory controller are listed below. Control registers: BnCSH/BnCSL(n = 0 to 3, EX) Configures the basic settings of the memory controller, such as the memory type specification and the number of wait states to be inserted into a read or write cycle. Memory Start Address register: MSARn(n = 0 to 3) Specifies a start address fora selected address space. Memory Address Mask register: MAMR (n = 0 to 3) Specifies a block size for a selected address space. Page ROM Control register: PMEMCR Selects a method of accessing Page-ROM. Timing control registers: CSTMGCR, WRTMGCR, RDTMGCRn Adjust the timing of rising and falling edges of control signals. On-chip Boot ROM Control register: BROMCR Selects a method of accessing Boot-ROM.
92CF26A-181
2007-11-21
TMP92CF26A
Table 3.8.1 Control Registers 7
B0CSL (0140H) B0CSH (0141H) MAMR0 (0142H) MSAR0 (0143H) B1CSL (0144H) B1CSH (0145H) MAMR1 (0146H) MSAR1 (0147H) B2CSL (0148H) B2CSH (0149H) MAMR2 (014AH) MSAR2 (014BH) B3CSL (014CH) B3CSH (014DH) MAMR3 (014EH) MSAR3 (014FH) Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State 1 1 1 1 1 M3S23 1 M3S22 1 M3S21 1 M3S20 R/W 1 1 1 1 0 B3E R/W 0 M3V22 M3V21 M3V20 0 M3V19 R/W 1 M3S19 1 M3S18 1 M3S17 1 M3S16 0 M3V18 0 1 0 B3REC 1 B3WW3 1 B3WW2 1 B3WW1 1 B3WW0 R/W 0 B3OM1 0 B3OM0 R/W 0 M3V17 0 M3V16 0 M3V15 1 B3BUS1 0 B3BUS0 1 M2S23 1 M2S22 1 M2S21 1 M2S20 R/W 1 B3WR3 1 B3WR2 1 B3WR1 1 B3WR0 1 M2V22 0 B2E R/W 0 M2V21 M2V20 0 M2V19 R/W 1 M2S19 1 M2S18 1 M2S17 1 M2S16 0 M2V18 0 B2M 1 0 B2REC 1 B2WW3 1 B2WW2 1 B2WW1 1 B2WW0 R/W 0 B2OM1 0 B2OM0 R/W 0 M2V17 0 M2V16 1 M2V15 1 B2BUS1 0 B2BUS0 1 M1S23 1 M1S22 1 M1S21 1 M1S20 R/W 1 B2WR3 1 B2WR2 1 B2WR1 1 B2WR0 0 B1E R/W 0 M1V21 M1V20 M1V19 0 M1V18 R/W 1 M1S19 1 M1S18 1 M1S17 1 M1S16 0 M1V17 0 1 0 B1REC 1 B1WW3 1 B1WW2 1 B1WW1 1 B1WW0 R/W 0 B1OM1 0 B1OM0 R/W 0 M1V16 0 M1V15-V9 0 M1V8 1 B1BUS1 0 B1BUS0 1 M0S23 1 M0S22 1 M0S21 1 M0S20 R/W 1 B1WR3 1 B1WR2 1 B1WR1 1 B1WR0 0 B0E R/W 0 M0V20 M0V19 M0V18 0 M0V17 R/W 1 M0S19 1 M0S18 1 M0S17 1 M0S16 0 M0V16 0 1 0 B0REC B0WW3
6
B0WW2
5
B0WW1
4
B0WW0 R/W
3
B0WR3 0 B0OM1
2
B0WR2 0 B0OM0 R/W 0 M0V15
1
B0WR1 1 B0BUS1 0 M0V14-V9
0
B0WR0 0 B0BUS0 0 M0V8
92CF26A-182
2007-11-21
TMP92CF26A
Table 3.8.2 Control Registers 7
BEXCSL (0158H) BEXCSH (0159H) PMEMCR (0166H) CSTMGCR (0168H) WRTMGCR (0169H) RDTMGCR0 (016AH) RDTMGCR1 (016BH) BROMCR (016CH) RAMCR (016DH) Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State Bit Symbol Read/Write Reset State 1 0 0 B3TCRS1 R/W 0 0 B1TCRS1 B1TCRS0 0 B3TCRS0 R/W 0 B3TCRH1 R/W 0 0 0 B1TCRH1 R/W 0 0 R/W 0 CSDIS 0 ROMLESS R/W 0/1 1/0
-
6
BEXWW2 0
5
BEXWW1 1
4
BEXWW0 0 BEXREC 0 OPGE R/W 0 R/W
3
BEXWR3 0 BEXOM1 0 OPWR1 0 R/W
2
BEXWR2 0 BEXOM0 R/W 0 OPWR0 0
1
BEXWR1 1 BEXBUS1 0 PR1 R/W 1 TAC1 R/W 0
0
BEXWR0 0 BEXBUS0 0 PR0 0 TAC0 0 TCWH0 R/W 0 B0TCRH0 0 B2TCRH0 0 VACE R/W R/W
BEXWW3 0
TACSEL1 0
TACSEL0 0 TCWS1 R/W 0 0 R/W 0 B2TCRS0 0 B0TCRS0 TCWS0
R/W TCWSEL1 TCWSEL0 R/W TCWH1 0
B1TCRH0 B0TCRS1
B0TCRH1 0 B2TCRH1
B3TCRH0 B2TCRS1
R/W Must be written as 1.
92CF26A-183
2007-11-21
TMP92CF26A
(2) Memory Access Operations After Reset After reset, external memory is accessed using the initial data bus width that is determined by the AM1 and AM0 pins. The settings of the AM1 and AM0 pins and their corresponding operation modes are as follows: AM1
0 0 1 1
AM0
0 1 0 1
Start Mode
Don't use this setting
Boots from external memory using a16-bit data bus
Don't use this setting
(Note)
Boots from the on-chip boot ROM (32-bit on-chip-MROM )
Note: The memory that is used for booting after reset must be either NOR-Flash or Masked-ROM. NAND-Flash SDRAM cannot be used.
The values of AM1 and AM0 are effective only upon reset. The data bus width is specified by the bits of the control registers at any other timing. Upon reset, only the control registers (B2CSH and B2CSL) for the CS2 space automatically becomes effective. (The B2CSH bit is set to 1 upon reset.).Then, the AM1 and AM0 values that specify the data bus width are loaded into the data bus width specification bits of the control register for the CS2 space.At the same time, the address range ebtween 000000H and FFFFFFH is defined as the CS2 space. (The B2CSH is cleared to 0.) Then, the address spaces are configured by MSARn and MAMRn. The BnCSH and BnCSL registers are also set up. The BnCSH must be set to 1 to enable these settings.
92CF26A-184
2007-11-21
TMP92CF26A 3.8.3 Basic Functions and Register Settings
This section describes some of the memory controller functions, such as setting the address range for each address space, associating memory to the selected space and setting the number of wait states to be inserted. (1) Programming chip select spaces The address ranges of CS0 to CS3 are specified by MSAR0 to MSAR3 and MAMR0 to MAMR3. (a) Memory Start Address registers Figure 3.8.1 shows the Memory Start Address registers. The MSAR0 to MSAR3 specify the start addresses for the CS0 to CS3 spaces. The bits S23 to S16 specify the upper 8 bits (A23 to A16) of the start address. The lower 16 bits of the start address (A15 to A0) are assumed to be 0. Accordingly, the start address can only be a multiple of 64 Kbytes, ranging from 000000H to FF0000H. Figure 3.8.2 shows the relationship between the start addresses and the Memory Start Address register values.
Memory Start Address Registers (for CS0 to CS3 spaces) 7
MSAR0 (0143H) MSAR2 (014BH) MSAR1 Bit Symbol (0147H) Read/Write MSAR3 Reset State (014FH) Function 1 1 1 1 S23
6
S22
5
S21
4
S20 R/W
3
S19 1
2
S18 1
1
S17 1
0
S16 1
Determines A23 to A16 of the start address
Specifies start addresses for CS0 to CS3 spaces
Figure 3.8.1 Memory Start Address Register
Start Address Address 000000H 64KByte
Value in the Memory Start Address register (MSAR0 to MSAR3)
000000H .................... 00H 010000H .................... 01H 020000H .................... 02H 030000H .................... 03H 040000H .................... 04H 050000H .................... 05H 060000H .................... 06H to to
FF0000H .................... FFH FFFFFFH
Figure 3.8.2 Relationship Between Start Addresses and the Memory Start Address Register Values
92CF26A-185
2007-11-21
TMP92CF26A
(b) Memory Address Mask Registers Figure 3.8.3 shows the Memory Address Mask registers. MAMR0 to MAMR3 are used to determine the sizes of the CS0 to CS3 spaces by setting particular bits in MAMR0 to MAMR3 to mask the corresponding start address bits. The address compare logic uses only the address bits that are not masked (i.e., mask bit cleared to 0) to detect an address match in the CS0 to CS3 spaces. The upper bits are always compared. Also, the address bits that can be masked by MAMR0 to MAMR3 differ between CS0 to CS3 spaces as follows: CS0 space: A20 to A8 CS1 space: A21 to A8 CS2 and CS3 spaces: A22 to A15 Accordingly, the block size that can be assigned to each space is also different.
Note: After reset, only the control register for the CS2 space is effective. The control register for the CS2 space has the B2M bit. If the B2M bit is cleared to 0, the address range between 000000H and FFFFFFH is defined as the CS2 space. (The B2M bit is cleared to 0after reset.) By setting the B2CSH bit to 1, the start address and the block size can be arbitrarily specified, as in the other spaces.
Memory Address Mask Register (for CS0 space) 7
MAMR0 (0142H) Bit Symbol Read/Write Reset State Function 1 1 1 1 V20
6
V19
5
V18
4
V17 R/W
3
V16 1
2
V15 1
1
V149 1
0
V8 1
CS0 block size 0: The address compare logic uses this address bit
The CS0 block size can vary from 256 Bytes to 2 Mbytes
Memory Address Mask Register (for CS1 space) 7
MAMR1 (0146H) Bit Symbol Read/Write Reset State Function 1 1 1 1 V21
6
V20
5
V19
4
V18 R/W
3
V17 1
2
V16 1
1
V159 1
0
V8 1
CS1 block size 0: The address compare logic uses this address bit
The CS1 block size can vary from 256 Bytes to 4 Mbytes
Memory Address Mask Register (for CS2 and CS3 spaces) 7
MAMR2 (014AH) MSAR3 Bit Symbol Reset State Function V22 1 (014FH) Read/Write 1 1 1
6
V21
5
V20
4
V19 R/W
3
V18 1
2
V17 1
1
V16 1
0
V15 1
CS2 or CS3 block size 0: The address compare logic uses this address bit.
The CS2 and CS3 block sizes can vary from 32 Kbytes to 8 Mbytes
Figure 3.8.3 Memory Address Mask Registers
92CF26A-186
2007-11-21
TMP92CF26A
(c) Setting the start addresses and address ranges An example of specifying a 64-Kbyte address space starting from 010000H for the CS0 space: Set 01H in the MSAR0 bits that corresponds to the upper 8 bits of the start address. Then, calculate the difference between the start address and the anticipated end address (01FFFFH) based on the size of the CS0 space. Bits 20 to 8 of the calculation result correspond to the mask value to be set for the CS0 space. Setting this value in the MAMR0 bits specifies the block size. This example sets 07H in MAMR0 to allocate a 64-Kbyte address space for the CS0 space.
Memory end address CS0 area Size (64 Kbytes)
0
0 0
0
0
0
0 1
0
1
1
1 F
1
1
1
1 F
1
1
1
1 F
1
1
1
1 F
1
1 H
S23 S22 S21 S20 S19 S18 S17 S16
MSAR0
0
0 0
0
0
0
0 1
0
1
0
0 0
0
0
0
0 0
0
0
0
0 0
0
0
0
0 0
0
0 H
Memory Start address
V20 V19 V18 V17 V16 V15
V14 V9
V8
MSMR0
0
0
0
0
0 0
0
0
0
1
1
1
1 7
1
1
1
1
1 H
1
1
1
1
1
1
1
Memory address mask register setting
Setting of 07H specifies a 64-Jbyte area.
(d) Programming block sizes Table 3.8.3 shows the relationship between CS spaces and their block sizes. The "" symbol indicates the size that might not be programmable depending on the combination of the values of the Memory Start Address and Memory Address Mask registers. When specifying a block size indicated as "", set the start address register to a multiple of the desired block size starting from 000000H. If the 16-Mbyte range is defined as CS2 space, or if two or more spaces overlap, the settings for the CS space with the smallest number overrides the settings for other spaces because of its highest priority. Example: Defining 128 Kbyte area as the CS0 space: a. Valid start addresses
000000H 020000H 040000H 060000H : 128 Kbytes The desired block size can be programmed with this 128 Kbytes 128 Kbytes configuration.
b. Invalid start addresses
000000H 010000H 030000H 050000H 64 Kbytes 128 Kbytes 128 Kbytes
This start address is not a multiple of the desired block size. Hence, the desired block size cannot be programmed with this configuration.
92CF26A-187
2007-11-21
TMP92CF26A
Table 3.8.3 Valid Block Sizes for Each CS Space
Size (Byte) CS space
256
512
32 K
64 K
128 K 256 K 512 K

1M

2M

4M
8M
CS0 CS1 CS2 CS3





Note: The "" symbol indicates the sizes that may not be programmable depending on the combination of the values of the Memory Start Address and Memory Address Mask registers.
(e) Priorities of the address spaces When the specified address space overlaps with the on-chip memory area, the priority order of the address spaces are as follows:
On-chip I/O > On-chip memory > CS0 space > CS1 space > CS2 space > CS3 space
(f) Specifying the number of wait states and the bus width for the address locations outside the CS0 to CS3 spaces The BEXCSL and BEXCSH registers specify the data bus width and number of wait states when an adress outside the CS0 to CS3 spaces ( CSEX space) is accessed. These registers are always enabled for the CSEX space.
92CF26A-188
2007-11-21
TMP92CF26A
(2) Memory specification Setting the BnCSH bits specifies the memory type that is associated with each address spaces. The interface signal that corresponds to the specified memory type is generated. The memory type is specified as follows: BnCSH BnOM1
0 0 1 1
BnOM0
0 1 0 1
Memory Type
SRAM/ROM (Default) (Reserved) (Reserved) SDRAM
Note: SDRAM can be associated with the CS1 or CS2 space.
(3) Data bus width specification The data bus width can be specified BnCSH bits as follows: BnCSH
0 0 1 1 0 1 0 1
for
each
address
space
by
the
Bus Width
8-bit bus mode (Default) 16-bit bus mode Reserved Don't use this setting
Note: The data bus width for SDRAM should be defined as 16 bits by setting BnCSH to 01.
As described above, the TMP92CF26A supports dinamic bus sizing, which allows the controller to transfer operands to or from the selected address spaces while automatically determining the data bus width. On which part of the data bus the data is actually placed is determined by the data size, bus width and start address. The table below provides a detailed description of the actual bus operation. The TMP92CF26A has only 16 external data bus pins. Therefore, please ignore the setting information of when the memory bus width is set to be 32 bits in the table.
Note: If two memories with different bus widths are assigned to consecutive addresses, do not execute an instruction that accesses the addresses crossing the boundary between those memories. Otherwise, a read/write operation might not be performed correctly.
92CF26A-189
2007-11-21
TMP92CF26A
Operand Data Size (bit)
Operand Start Address 4n + 0 4n + 1
Mem ory Bus W idth CPU Address (bit) 8/16/32 8 16/32 8/16 32 8 16 32 8 16/32 8 4n + 0 4n + 1 4n + 1 4n + 2 4n + 2 4n + 3 4n + 3 4n + 3 (1) 4n + 0 (2) 4n + 1 4n + 0 (1) 4n + 1 (2) 4n + 2 (1) 4n + 1 (2) 4n + 2 4n + 1 (1) 4n + 2 (2) 4n + 1 4n + 2 4n + 2 (1) 4n + 3 (2) 4n + 4 (1) 4n + 3 (2) 4n + 4 (1) 4n + 3 (2) 4n + 4 (1) 4n + 0 (2) 4n + 1 (3) 4n + 2 (4) 4n + 3 (1) 4n + 0 (2) 4n + 2 4n + 0 (1) 4n + 0 (2) 4n + 1 (3) 4n + 2 (4) 4n + 3 (1) 4n + 1 (2) 4n + 2 (3) 4n + 4 (1) 4n + 1 (2) 4n + 4 (1) 4n + 2 (2) 4n + 3 (3) 4n + 4 (4) 4n + 5 (1) 4n + 2 (2) 4n + 4 (1) 4n + 2 (2) 4n + 4 (1) 4n + 3 (2) 4n + 4 (3) 4n + 5 (4) 4n + 6 (1) 4n + 3 (2) 4n + 4 (3) 4n + 6 (1) 4n + 3 (2) 4n + 4
CPU Data D31 to D24 D23 to D16 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 xxxxx xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b31 to b24 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b23 to b16 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b23 to b16 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b31 to b24 D15 to D8 xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx b15 to b8 xxxxx xxxxx b7 to b0 xxxxx b7 to b0 xxxxx xxxxx b15 to b8 xxxxx xxxxx xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 b31 to b24 b15 to b8 xxxxx xxxxx xxxxx xxxxx b7 to b0 b23 to b16 xxxxx b7 to b0 xxxxx xxxxx xxxxx xxxxx xxxxx b15 to b8 b31 to b24 xxxxx b31 to b24 xxxxx xxxxx xxxxx xxxxx b7 to b0 b23 to b16 xxxxx xxxxx b23 to b16 D7 to D0 b7 to b0 b7 to b0 xxxxx b7 to b0 xxxxx b7 to b0 xxxxx xxxxx b7 to b0 b15 to b8 b7 to b0 b7 to b0 b15 to b8 xxxxx b15 to b8 xxxxx b7 to b0 b15 to b8 b7 to b0 xxxxx b7 to b0 b15 to b8 xxxxx b15 to b8 xxxxx b15 to b8 b7 to b0 b15 to b8 b23 to b16 b31 to b24 b7 to b0 b23 to b16 b7 to b0 b7 to b0 b15 to b8 b23 to b16 b31 to b24 xxxxx b15 to b8 b31 to b24 xxxxx b31 to b24 b7 to b0 b15 to b8 b23 to b16 b31 to b24 b7 to b0 b23 to b16 xxxxx b23 to b16 b7 to b0 b15 to b8 b23 to b16 b31 to b24 xxxxx b15 to b8 b31 to b24 xxxxx b15 to b8
8
4n + 2 4n + 3
4n + 0
4n + 1
16 32
16
8 4n + 2 16 32 8 4n + 3 16 32
8 4n + 0 16 32
8 4n + 1 16
32 32 8 4n + 2 16 32
8 4n + 3 16
32
xxxxx: The input data placed on the data bus indicated by this symbol is ignored during a read operation. During a write operation, the bus is in the high-impedance state, and the write strobe signal remains inactive.
92CF26A-190
2007-11-21
TMP92CF26A
(4) Wait control The external bus cycle completes in two states at minimum (25 ns at fSYS = 80 MHz) without inserting a wait state. Setting up the BnCSL bits specifies the number of wait states to be inserted in a write cycle, and setting the BnCSL bits specifies the number of wait states to be inserted in a read cycle. The external bus cycle can be programmed as follows; BnCSL/
0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 1 0 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Number of Wait States 2 states (0 wait state), fixed wait-state mode 3 states (1 wait state), fixed wait-state mode (Default) 4 states (2 wait states), fixed wait-state mode 5 states (3 wait states), fixed wait-state mode 6 states (4 wait states), fixed wait-state mode 7 states (5 wait states), fixed wait-state mode 8 states (6 wait states), fixed wait-state mode 9 states (7 wait states), fixed wait-state mode 10 states (8 wait states), fixed wait-state mode 11 states (9 wait states), fixed wait-state mode 12 states (10 wait states), fixed wait-state mode 14 states (12 wait states), fixed wait-state mode 18 states (16 wait states), fixed wait-state mode 22 states (20 wait states), fixed wait-state mode 6 states + WAIT pin input mode (Reserved)
Other than the above
Note 1:For SDRAM, the above settings are not effective. Refer to Section 3.16, SDRAM controller. Note 2:For NAND flash memory, the above settings are not effective.
(a) Fixed wait-state mode The bus cycle is completed in the specified number of states. The number of states can be selected from 2 (0 wait state) through 12 (10 wait states), 14 (12 wait states), 18 (16 wait states) and 22 (20 wait states). (b)
WAIT pin input mode
In this mode, the WAIT signal is sampled. A wait state is continued to be inserted while the WAIT signal is sampled active. The minimum bus cycle in this mode is six states. The bus cycle is completed if the WAIT signal is sampled High at the rising edge of SDCLK in the sixth state. The bus cycle is extended as long as the WAIT signal remains active after sixth state.
92CF26A-191
2007-11-21
TMP92CF26A
(5) Recovery cycle (data hold time) control For some memory, the data hold time after when the CE or OE signal is asserted in a read cycle is defined by the AC specification. This may lead to data conflicts. Thus, to avoid this problem, a single dummy cycle can be inserted immediately after an access cycle for the CSm space by setting the BmCSH bit to 1. This single dummy cycle is inserted when another CS space is accessed in the next bus cycle. BnCSH
0 1 No dummy cycle is inserted (Default). Dummy cycle is inserted.
*
When no dummy cycle is inserted (0 wait state)
SDCLK A23 to A0
CSm
CSn RD
*
When a single dummy cycle is inserted (0 wait state)
Dummy SDCLK A23 to A0
CSm
CSn RD
92CF26A-192
2007-11-21
TMP92CF26A
(6) Timing adjustment function for control signals This function allows for the timing adjustment of the rising and falling edges of the CSn , CSZx , CSXx , R/ W , RD , WRxx , SRWR and SRxxB signals based on the setup and hold time requirements of memories. As for the CSn , CSZx , CSXx and R/ W signals, and also for the WRxx , SRWR and SRxxB signals (generated in a write cycle), their timing can be adjusted for only one CS space. As for the RD and SRxxB signals (generated in a read cycle), their timing can be adjusted individually for each of all CS spaces. As for the CS and EX spaces for which the timing adjustment is not performed, the buses connected to them operate with basic bus timing. (Refer to (7).) This function can not be used while the BnCSH bit is enabled. The control signals of SDRAM can be adjusted by setting up the SDRAM controller. CSTMGCR, WRTMGCR
00 01 10 11 Change the bus timing for CS0 space Change the bus timing for CS1 space Change the bus timing for CS2 space Change the bus timing for CS3 space
CSTMGCR
00 01 10 11 TAC = 0 x fSYS (Default) TAC = 1 x fSYS TAC = 2 x fSYS (Reserved)
TAC:The delay from A23-A0 to CSn, CSZx, CSXx, R/W.
WRTMGCR
00 01 10 11 TCWS/H = 0.5 x fSYS (Default) TCWS/H = 1.5 x fSYS TCWS/H = 2.5 x fSYS TCWS/H = 3.5 x fSYS
TCWS:The delay from CSn to WRxx,SRWR,SRxxB. TCWH:The delay from WRxx,SRWR,SRxxB to CSn.
RDTMGCR0/1
00 01 10 11 TCRH:The delay from RD,SRxxB to CSn. TCRH = 0 x fSYS (Default) TCRH = 1 x fSYS TCRH = 2 x fSYS TCRH = 3 x fSYS
92CF26A-193
2007-11-21
TMP92CF26A
RDTMGCR0/1
00 01 10 11 TCRS:The delay from CSn to RD,SRxxB. TCRS = 0.5 x fSYS (Default) TCRS = 1.5 x fSYS TCRS = 2.5 x fSYS TCRS = 3.5 x fSYS
T1 SDCLK (80MHz) A23 to A0
T2
T3
TW
Tn-2
Tn-1
Tn
CSn R/ W
RD Read cycle SRxxB D15 to D0
TAC
TAC TCRS
Input
TCRH
WRxx Write cycle
SRWR
TCWS Output TCWS
TCWH Output
SRxxB D15 to D0
Note: Wait states (TWs) are inserted as specified by the BnCSL register. No TW is inserted if the number of wait state is specified as zero.
92CF26A-194
2007-11-21
TMP92CF26A
(7) Basic bus timing (a) External bus read/write cycle (0 wait state)
SDCLK (60 MHz)
CSn
T1
T2
A23 to A0
RD , SRxxB
Read D15 to D0
SRWR , SRxxB
WRxx
Input
Write
D15 to D0
Output
(b) External bus read/write cycle (1 wait state)
SDCLK (60 MHz)
CSn
T1
TW
T2
A23 to A0
RD , SRxxB
Read D15 to D0
SRWR , SRxxB WRxx
Input
Write
D15 to D0
Output
92CF26A-195
2007-11-21
TMP92CF26A
(c) External bus read cycle (1 wait state + TAC: 1 fSYS + TCRS: 1.5 fSYS + TCRH: 1 fSYS) External bus write cycle (1 wait state + TAC: 1 fSYS + TCWS/H: 1.5 fSYS) T1
SDCLK (80 MHz) CSn A23 to A0 TAC
T2
T3
T4
T5
T6
TAC
RD SRxxB
TCRS Input
TCRH
Read
D15 to D0 SRWR , SRxxB
WRxx
TCWS TCWS
TCWH
Write
TCWH Output
D15 to D0
WAIT
(d) External bus read/write cycle (4 wait states + WAIT pin input mode) T1
SDCLK (80 MHz) CSn A23 to A0
T2
T3
T4
T5
T6
RD SRxxB
Read
D15 to D0 SRWR , SRxxB
WRxx
Input
Write
Output
D15 to D0
WAIT
Sampling
92CF26A-196
2007-11-21
TMP92CF26A
(e) External bus read/write cycle (4 wait states + WAIT pin input mode) T1
SDCLK (80 MHz) CSn A23 to A0
T2
T3
T4
T5
TW
T6
RD SRxxB
Read D15 to D0
SRWR , SRxxB
WRxx
Input
Write Output
D15 to D0
WAIT
Sampling Sampling
(f)
External bus read cycle (4 wait states + WAIT pin input mode +TAC: 1fSYS + TCRS: 1.5fSYS + TCRH: 1fSYS) External bus write cycle (4 wait states + WAIT pin input mode + TAC: 1fSYS + TCWS/H: 1.5fSYS) T2 T3 TW T8 T9 T10
T1
SDCLK (80 MHz) CSn A23 to A0
T4T7
RD SRxxB
Read D15 to D0 SRWR , SRxxB
WRxx
Input
Write TCWS Output TCWS
D15 to D0
WAIT Sampling Sampling
92CF26A-197
2007-11-21
TMP92CF26A
(8) External memory connections Figure 3.8.4 shows an example of how to connect external 16-bit SRAM and 16-bit NOR flash to the TMP92CF26A.
TMP92CF26A
RD
16-bit SRAM
OE
SRLLB SRLUB
LDS UDS
SRWR CS0
R/W
CE
D [15:0] A0 A1 A2 A3
Not connect
I/O [16:1] A0 A1 A2
16-bit NOR flash
OE WE CS2 CE
DQ [15:0] A0 A1 A2
Figure 3.8.4 Example of External 16-Bit SRAM and NOR Flash Connection
92CF26A-198
2007-11-21
TMP92CF26A 3.8.4 Controlling the Page Mode Access to ROM
This section describes page mode access operations to ROM and the required register settings. The page mode operation to ROM is specified by PMEMCR. (1) Operations and register settings The TMP92CF26A supports page mode accesses to ROM. Only the CS2 space can be configured for this mode of access. The page mode operation to ROM is specified by the Page ROM Control register, PMEMCR. Setting the PMEMCR bit to 1 sets the mode of memory access to the CS2 space to page mode. The number of cycles required PMEMCR bits. PMEMCR
0 0 1 1 0 1 0 1
for
a
read
cycle
is
specified
by
the
Number of Cycles in Page Mode
1 cycle (n-1-1-1 mode) (n 2) 2 cycles (n-2-2-2 mode) (n 3) 3 cycles (n-3-3-3 mode) (n 4) 4 cycles (n-4-4-4 mode) (n 5)
Note: Specify the number of wait states (n) using the control register (BnCSL) for each address space.
The page size (the number of bytes) of ROM as seen from the CPU is determined by PMEMCR. When the specified page boundary is reached, the controller terminates the page read operation. The first data of the next page is read in the normal mode. Then, the following data is read again in page mode. PMEMCR
0 0 1 1

0 1 0 1
ROM Page Size
64 bytes 32 bytes 16 bytes (Default) 8 bytes
SDCLK tCYC
A0~A23
+0
+1
+2
+3
CS2
tAD3
RD
tAD2
tAD2
tAD2
tHA
tRD3 D0~D15
Input Data
tHA
Input Data
tHA
Input Data
tHA
Input Data
tHR
Figure 3.8.5 Page Mode Access Timing (when using a 8-byte page size)
92CF26A-199
2007-11-21
TMP92CF26A 3.8.5 On-Chip Boot ROM Control
This section describes the on-chip boot ROM. For the program specification of boot ROM, refer to Section 3.4, Boot ROM. (1) BOOT mode The TMP92CF26A boots in BOOT mode following the AM1 and AM0 settings upon reset. AM1
0 0 1 1
AM0
0 1 0 1
Start mode
Don't use this setting
Boots from external memory using a 16-bit data bus
Don't use this setting Boots from the on-chip Boot ROM (32-bit on-chip MROM)
(2) Memory map of the boot ROM The Boot ROM consists of 8-Kbyte masked ROM and is located in the memory area from 3FE000H to 3FFFFFH.
000000H On-Chip I/O , RAM 04A000H 3FE000H On-Chip Boot ROM (8 Kbytes) 3FFF00H 400000H (B) Reset/Interrupt Vector area (256 bytes)
FFFF00H
(A) Reset/Interrupt Vector area (256 bytes)
(3) Reset/interrupt address select circuitry The reset/interrupt vector area is located in the memory area from FFFF00H to FFFFEFH (area (A)) in the TLCS-900/H1. Since the boot ROM is located in the different area, the TMP92CF26A supports reset/interrupt vector address select circuitry. In BOOT mode, the reset/interrupt vector area is located in the memory area from 3FFF00H to 3FFFEFH (area (B)). By clearing the BROMCR bit to 0 after the boot sequence, the vector area can be remapped to the area (A). Therefore, the area (A) can be used only for the system routine. This BROMCR bit is initialized to 1 in BOOT mode. In any other start mode, this register has no effect.
Note: Since the last 16-byte area (FFFFF0H to FFFFFFH) is reserved for an emulator, this area is not remapped by clearing the BROMCR bit.
92CF26A-200
2007-11-21
TMP92CF26A
(4) Bypassing boot ROM The application system program may continue to run without asserting a reset signal even after completing the boot sequence in BOOT mode. In this case, the external memory area from 3FE000H to 3FFFFFH can not be accessed because the boot ROM already resides in the same area. To avoid such a situation, the on-chip boot ROM can be bypassed by setting the BROMCR bit to 1. This BROMCR bit is initialized to 0 in BOOT mode, while it is initialized to 1 in other start modes. If this bit has been set to 1, writing a 0 to this bit is ignored. 7
BROMCR Bit Symbol (016CH) Read/Write Reset State Function
6
5
4
3
2
CSDIS 1
1
ROMLESS R/W 0/1 (note)
0
VACE 1/0 (note) Vector address conversion 0: Disable 1: Enable
Nand_Flash Boot ROM area 0: Disable CS output 1: Enable 0: Enable 1: Disable
Note: Reset states differ depending on start modes.
92CF26A-201
2007-11-21
TMP92CF26A 3.8.6 Notes
(1) Timing for the CS and RD signals If the load capacitance of the RD (Read) signal line is greater than that of the CS (Chip Select) signal line, the deassertion timing of the read signal is delayed, which may lead to an unintentional extension of a read cycle. Such an unintended read cycle extention, which is indicated as (a) in Figure 3.8.6, may cause a problem.
SDCLK (60 MHz) A23 to A0
CSm
CSn RD
(a)
Figure 3.8.6 Read Cycle of When the Read Signal is Delayed
Example: When using an externally connected NOR flash whose commands are compatible with the standard JEDEC commands, the toggle bit may not be read correctly. If the rising edge of the read signal in the cycle immediately preceding the NOR flash access cycle does not occur in time, a read cycle may be extended unintentilnally as indicated as (b) in Figure 3.8.7. Memory access SDCLK (60 MHz) A23 to A0 NOR flash chip select
RD
Toggle bit RD cycle
Toggle bit (b)
Figure 3.8.7 NOR Flash Toggle Bit Read Cycle When the toggle bit is inverted due to this unexpected read cycle extension, the CPU cannot read the toggle bit properly and it always reads the same value from the toggle bit. To avoid this situation, it is recommended to perform data polling or to use the timing adjustment function for the rising edge of the RD signal (RDTMGCRn ).
92CF26A-202
2007-11-21
TMP92CF26A
(2) Setting up the NAND flash area Figure 3.8.8 shows a memory map for the NAND flash memory. Since it is recommended that the CS3 space be located in the memory area from 000000H to 3FFFFFH, the following description is provided for such condition.In this case, the NAND flash area overlaps with the CS3 space. However, the CS3 pin is not asserted by setting the BROMCR bit to 1. Likewise, the CS0 through CS3 pins, the
CSXA through CSXB pins and the CSZA through CSZD pins are not asserted either.
Note 1: In the above setting, 296 Kbytes out of the memory area for the CS3 (000000H to 049FFFH) cannot be used. Note 2: The 16-byte area (001FF0H to 001FFFH) is predefined asNAND Flash area as shown below regardless of which CS space is selected. Therefore, the setting of the CS3 space does not affect the NAND flash area. (NAND-Flash area specification) 1. Bus width : Specified by NDFMCR1 in the NAND Flash controller.
2. Wait control : Specified by NDFMCR and NDFMCR in the NAND Flash controller 000000H Internal I/O 001FF0H NAND flash (16 bytes) 002000H Internal RAM (144Kbytes) 021FFFH All CS pins become to unactibe by BROMCR ="1"
046000H Internal Back UP RAM (16 Kbytes) 04A000H
COMMON X (2 Mbytes)
200000H
CS3 area setting 000000H to 3FFFFFH (4 Mbytes)
LOCAL X (2 Mbytes)
400000H
Figure 3.8.8 Recommended CS3 Space Assignment
92CF26A-203
2007-11-21
TMP92CF26A
(3) Setting up the NAND flash area In case of using SDRAM (SDCS) and NAND flash together, the BROMCR bit cannot be used. This section provides an example of such cases. It is recommended that the memory area from 000000H to 3FFFFFH be assigned to the CS2 or CS1 (SDCS) space. A detailed description is provided below.. In this case, the NAND flash area overlaps with the CS2 or CS1 (SDCS) space. So, if a program accesses NAND flash, the CS2 or CS1 space and NAND flash space are accessed at the same time, which leads to problems such as a data conflict. To avoid this, it is recommended that the 32-Kbyte memory area from 000000H to 007FFFH be assigned to the CS0 space. (The CS0 pin is not required.) Since the CS0 setting has higher priority over the settings of the CS2 and CS1 spaces, only NAND flash will be accessed without causing data conflicts.
Note: In this case, the 32-Kbyte memory area from 000000H to 007FFFH within the SDCS space cannot be used.
000000H Internal I/O 001FF0H NAND flash (16 bytes) 002000H Internal RAM (128 Kbytes) 021FFFH CS0 area setting 000000H to 007FFFH (32 Kbytes)
046000H Internal Back UP RAM (16 Kbytes) 04A000H
COMMON X (2 Mbytes)
200000H
SDCS: CS2 or CS1 area setting 000000H to 3FFFFFH (4 Mbytes)
LOCAL X (2 Mbytes)
400000H
Figure 3.8.9 Recommended Assignment for the SDCS and CS0 Spaces
92CF26A-204
2007-11-21
TMP92CF26A
3.9
External Memory Extension (MMU)
The MMU allows for memory expansion by providing three local memory areas, the MMU function allows for the expansion of the program/data area to 3.1Gbytes. For recommended address memory maps, refer to Figure 3.9.1 and Figure 3.9.3. However, when the amount of memory being used is less than 16 Mbytes, it is not necessary to configure the MMU register. For such cases, please refer to the section on the Memory controller. A memory area which can be configured into banks is called the LOCAL area. The address range assigned to the LOCAL area is predefined and cannot be changed. And the rest of the memory area is called the COMMON area. Basically, a series of program routines should be stored entirely within one bank. The program execution cannot be branched between different banks of the same LOCAL area using the JP instruction. For more details, refer to the following programming examples. The TMP92CF26A has the following external pins for connecting external memory. * * * Address bus: EA28, EA27, EA26, EA25, EA24 and A23 to A0 Chip Select: CS0 to CS3 , CSXA to CSXB , CSZA to CSXD , SDCS , ND0CE and ND1CE Data bus: D15 to D0
3.9.1
Recommended Memory Map
Figure 3.9.1 shows one of recommended address memory maps. This is an example of when memory is expanded to the maximum size. Figure 3.9.3 shows a memory address map example for a simple memory system consisting of on-chip boot ROM, NAND-Flash and SDRAM.
92CF26A-205
2007-11-21
TMP92CF26A
Memory controller
ND0CE
pin (512 MB) pin (512 MB)
CSXB
setting
Address memory map
ND1CE
000000H
On-chip I/O, RAM
CSXA
pin
pin CS3-space 4 MB
COMMON-X (2 MB) 200000H LOCAL-X (2 MB) 400000H LOCAL-Y (2 MB) 600000H COMMON-Y (2 MB) 800000H Bank 0 1 2 Bank 0 1 2
512 MB (2 MB x 256)
512 MB (2 MB x 256)
3
15
255 256
511
3
15
63 CS1-space 4 MB
SDCS : 64 MB (when connecting SDRAM: 2MBx32) (Note 2)
or CS1 pin: 128MB (2MBx64)
LOCAL-Z (4 MB)
Bank 0
1
2
3
127 128 255 384 511
CS2-space C00000H COMMON-Z (4 MB)
CSZA pin (Note 1) 512 MB (4 MB x 128) CSZB pin
8 MB
CSZD
pin
FFFF00H FFFFFFH
: On-chip
memory area area overlapping with COMMON-area, which cannot be configured as LOCAL-area.
Vector area
: Memory
Note1: CSZA is a chip-select signal for not only bank 0 through bank 127 of the LOCAL-Z area, but also for the COMMON-Z area. Note2: In case of connecting SDRAM to the Y-area, the maximum expanded memory size is 64 MB (2 MB x 32).
Figure 3.9.1 Recommended Memory Map for the Maximum Expansion (Logical address)
92CF26A-206
2007-11-21
TMP92CF26A
92CF26A
LOCAL-X
CSXA to CSXB , EA24 to EA28
512 MB x 2 = 1024 MB
LOCAL-Y
SDCS or CS1 128 MB or 64 MB (Note)
CSZA
LOCAL-Z
CSZA to CSZD , EA24 to EA28 512 MB x 4 = 2048 MB
CSZD
CSXA
000000H
Bank 0
Bank 0 Bank 0 Bank 384
On-chip I/O and on-chip RAM Bank 63
Bank 127 Bank 255
CSXB
Bank 511
CSZB
Bank256 Bank128
Bank 255 Bank 511
CSZC
Bank 256
Bank 383
Note: In case of connecting SDRAM to the Y-area, the maximum expanded memory size is 64MB (2MBx32).
Figure 3.9.2 Recommended Memory Map for the Maximum Expansion (Physical address)
92CF26A-207
2007-11-21
TMP92CF26A
ND 0 CE
pin (512 MB) pin (512 MB)
Memory controller setting
Address memory map
ND1CE
000000H
On-chip I/O, RAM
COMMON-X (2 MB) 200000H 3FE000H 400000H LOCAL-Y (2 MB) LOCAL-X (2 MB) On-chip boot ROM (8 KB)
600000H COMMON-Y (2 MB) 800000H
LOCAL-Z (4 MB)
Bank 0
1
2
3
15
C00000H
SDCS pin
CS2-space 8 MB COMMON-Z (4 MB) 64 MB (4 MB x 16)
FFFF00H FFFFFFH
Vector area
: :
On-chip memory area Memory area overlapping with COMMON-area, which cannot be configured as LOCAL-area.
Note: In case of connecting SDRAM to the Z-area, the maximum expanded memory size is 64 MB (4 MB x 16).
Figure 3.9.3 Recommended Memory Map for a Simple System (Logical address) 92CF26A LOCAL-Z
SDCS (Note) 4 MB x16 = 64 MB
000000H On-chip I/O and RAM 3FE000H
SDCS
Bank 0
On-chip boot ROM
Bank 15
Note: In case of connecting SDRAM to the Z-area, the maximum expanded memory size is 64 MB (4 MB x 16) .
Figure 3.9.4 Recommended Memory Map for a Simple System (Physical address)
92CF26A-208
2007-11-21
TMP92CF26A 3.9.2 Control registers
The TMP92CF26A MMU has 24 registers. These registers are used for storing eight types of data (program, read data, write data, LCD-display data, source data for DMA channels of odd/even number, destination-data for DMA channels of odd/even number) for each of three-LOCAL areas (LOCAL-X through LOCAL-Z). These registers allow for easy data access. (How to use the control registers) First, load the control registers for each LOCAL area with the desired bank number and enable/disable the specified bank. Then, configure the external pins to be used and also the Memory Controller. Then, when the CPU or LCDC accesses a logical address in the LOCAL area, the MMU translates the logical address to the corresponding physical address according to the programmed bank configuration. The physical address is then placed on the external address bus pin, which enables external memory accesses. Thus, even when a program accesses the same logical address, its physical address changes depending on the bank specified by the program bank register. This enables memory accesses to the different memory banks.
Note1: When programming the bank registers, the bank area that is overlapping with the COMMON area must not be specified ( because addresses of those areas are converted to the same physical addresses). Note2: In the LOCAL area, changing Program bank number (LOCALPX, Y or Z) is disabled. Program bank setting of each LOCAL area must change in COMMON area. (But bank setting of data-Read, data-Write and LCDC-display data can change also in LOCAL area.) Note3: After setting values specifying the data bank number into bank registers for the read, write, DMA and LCD display data (LOCALRn, LOCALWn or LOCALLn, LOCALEDn, LOCALSn, LOCALODn; the symbol "n" indicates X, Y or Z), the specified bank requires a certain setup time to be enabled. Thus, the bank cannot be accessed by an instruction immediately following the register setting instructions. In this case, insert a dummy instruction which accesses SFR or another memory area as shown in the following example. (Example) ld ldw ldw ldw xix, 200000h (localrx), 8001h wa, (localrx) wa, (xix) ; ; Specify the read-data bank number ; Inserted dummy instruction which accesses SFR ; instruction which reads bank 1 of the LOCAL-X area.
Note4: When the LOCAL-Z area is used, pin P82 should be assigned as the chip select signal CSZA . In this case,
CSZA works as the chip select signal for the bank 0 through the bank 15, and also for the COMMON-Z area.
After reset, pin P82 should be properly configured following the procedure below. ldw ldw ldw ldw ld (localpz), 8000h (localrz), 8000h (localwz), 8000h (locallz), 8000h (P8FC),
-- - - -0 - -B
; Enable the banks in LOCAL-Z for program ; Enable the banks in LOCAL-Z for read data ; Enable the banks in LOCAL-Z for write data (*1) ; Enable the banks in LOCAL-Z for LCD display memory (*2) ; Assign P82 as the CSZA output
ld (P8FC2), - - - - - 1 - - B ; (*1) This setting is not required if the COMMON-Z area is not used to store write data. (*2) This setting is not required if the COMMON-Z area is not used to store display data for LCD.
92CF26A-209
2007-11-21
TMP92CF26A
3.9.2.1 Program bank registers
These registers should be loaded with bank number values to specify the bank to be used as program memory. As described above, the program execution cannot be directly branched to a different bank in the same LOCAL area. The bank switching within the same LOCAL area is prohibited. LOCAL-X Register for Program 7
LOCALPX Bit Symbol (0880H) Read/Write Reset State Function X7 0
6
X6 0
5
X5
4
X4 R/W
3
X3
2
X2
1
X1
0
X0
0 0 0 0 0 0 Specify the bank number for the LOCAL-X area (Since bank 0 is overlapping with the COMMON area, this filed must not be specified as 0.)
15
(0881H) LXE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-X 0: Disable 1: Enable
14
13
12
11
10
9
8
X8 R/W 0
Specify the bank number for the LOCAL-X area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 011111111 CSXA 100000000 to 111111111 CSXB
LOCAL-Y Register for Program 7
LOCALPY Bit Symbol (0882H) Read/Write Reset State Function
6
5
Y5 0
4
Y4
3
Y3
2
Y2
1
Y1
0
Y0
R/W 0 0 0 0 0 Specify the bank number for the LOCAL-Y area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(0883H) LYE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-Y 0: Disable 1: Enable
14
13
12
11
10
9
8
LOCAL-Z Register for Program 7
LOCALPZ Bit Symbol (0884H) Read/Write Reset State Function Z7 0
6
Z6 0
5
Z5 0
4
Z4 R/W 0
3
Z3 0
2
Z2 0
1
Z1 0
0
Z0 0
Specify the bank number for the LOCAL-Z area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(0885H) Bit Symbol Read/Write Reset State Function LZE R/W 0 Bank for LOCAL-Z 0: Disable 1: Enable
14
13
12
11
10
9
8
Z8 R/W 0
Specify the bank number for the LOCAL-Z area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 001111111 CSZA 010000000 to 011111111 CSZB 100000000 to 101111111 CSZC 110000000 to 111111111 CSZD
92CF26A-210
2007-11-21
TMP92CF26A
3.9.2.2 LCD Display Data Bank Registers
These registers should be loaded with bank number values to specify the bank to be used as LCD display data memory. Since the data bank registers for CPU and LCDC are prepared independently, the banks that are accessed by the CPU (for program, read and write data) can be switched while the LCD display is on. LOCAL-X Register for LCD Data 7
LOCALLX Bit Symbol (0888H) Read/Write Reset State Function X7
6
X6
5
X5
4
X4 R/W
3
X3
2
X2
1
X1
0
X0
0 0 0 0 0 0 0 0 Specify the bank number for the LOCAL-X area (Since bank 0 is overlapping with the COMMON area, this filed must not be specified as 0. )
15
(0889H) LXE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-X 0: Disable 1: Enable
14
13
12
11
10
9
8
X8 R/W 0
Specify the bank number for the LOCAL-X area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 011111111 CSXA 100000000 to 111111111 CSXB
LOCAL-Y Register for LCD Data 7
LOCALLY Bit Symbol (088AH) Read/Write Reset State Function
6
5
Y5 0
4
Y4
3
Y3
2
Y2
1
Y1
0
Y0
R/W 0 0 0 0 0 Specify the bank number for the LOCAL-Y area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(088BH) LYE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-Y 0: Disable 1: Enable
14
13
12
11
10
9
8
LOCAL-Z Register for LCD Data 7
LOCALLZ (088CH) Bit Symbol Read/Write Reset State Function Z7 0
6
Z6 0
5
Z5
4
Z4
3
Z3
2
Z2
1
Z1
0
Z0
R/W 0 0 0 0 0 0 Specify the bank number for the LOCAL-Z area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(088DH) Bit Symbol Read/Write Reset State Function Bank for LOCAL-Z 0: Disable 1: Enable LZE R/W 0
14
13
12
11
10
9
8
Z8 R/W 0
Specify the bank number for the LOCAL-Z area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 001111111 CSZA 100000000 to 101111111 CSZC 010000000 to 011111111 CSZB 110000000 to 111111111 CSZD
92CF26A-211
2007-11-21
TMP92CF26A
3.9.2.3 Read-Data Bank Registers
These registers should be loaded with bank number values to specify the banks to be used as read-data memory. The following example shows how to specify bank 1 for storing read data in the LOCAL-X area. The instruction, "ldw wa, (xix),"reads the data from the memory location at the address xix and stores it into the wa register of the CPU. When loading the address xix into the read-data bank register, the bank is only enabled upon a data (operand) read operation for the memory location at the address xix.
(Example) ld ld ldw ldw xix, 200000h (localrx), 81h wa, (localrx) wa, (xix) ; ; ; ; Specify the read-data bank number. Insert a dummy instruction that accesses SFR Read bank 1 of the LOCAL-X area
LOCAL-X Register for Read Data 7
LOCALRX (0890H) Bit Symbol Read/Write Reset State Function X7 0
6
X6 0
5
X5
4
X4
3
X3
2
X2
1
X1
0
X0
R/W 0 0 0 0 0 0 Specify the bank number for the LOCAL-X area (Since bank 0 is overlapping with the COMMON area, this filed must not be specified as 0.)
15
(0891H) LXE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-X 0: Disable 1: Enable
14
13
12
11
10
9
8
X8 R/W 0
Specify the bank number for the LOCAL-X area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 011111111 CSXA 100000000 to 111111111 CSXB
LOCAL-Y Register for Read Data 7
LOCALRY (0892H) Bit Symbol Read/Write Reset State Function
6
5
Y5 0
4
Y4
3
Y3 R/W
2
Y2
1
Y1
0
Y0
0 0 0 0 0 Specify the bank number for the LOCAL-Y area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(0893H) LYE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-Y 0: Disable 1: Enable
14
13
12
11
10
9
8
92CF26A-212
2007-11-21
TMP92CF26A
LOCAL-Z Register for Read Data 7
LOCALRZ (0894H) Bit Symbol Read/Write Reset State Function Z7
6
Z6
5
Z5
4
Z4
3
Z3
2
Z2
1
Z1
0
Z0
R/W 0 0 0 0 0 0 0 0 Specify the bank number for the LOCAL-Z area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(0895H) Bit Symbol Read/Write Reset State Function Bank for LOCAL-Z 0: Disable 1: Enable LZE R/W 0
14
13
12
11
10
9
8
Z8 R/W 0
Specify the bank number for the LOCAL-Z area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 001111111 CSZA 100000000 to 101111111 CSZC 010000000 to 011111111 CSZB 110000000 to 111111111 CSZD
92CF26A-213
2007-11-21
TMP92CF26A
3.9.2.4 Write-Data Bank Registers
These registers should be loaded with bank number values to specify the banks to be used as write data memory. The following example shows how to specify bank 1 for storing write data in the LOCAL-X area. The instruction, "ldw (xix), wa," writes the wa register value of the CPU into the memory location at the address xix. When loading the address xix into the read-data bank register, the bank is only enabled upon a data (operand) write operation for the memory location at the address xix.
(Example) ld ld ldw ldw xix, 200000h (localwx), 81h wa, (localwx) (xix), wa ; ; ; ; Specify the write-data bank number. Insert a dummy instruction that accesses SFR Write to bank 1 of the LOCAL-X area
LOCAL-X Register for Write Data 7
LOCALWX Bit Symbol (0898H) Read/Write Reset State Function X7 0
6
X6 0
5
X5
4
X4
3
X3
2
X2
1
X1
0
X0
R/W 0 0 0 0 0 0 Specify the bank number for the LOCAL-X area (Since bank 0 is overlapping with the COMMON area, this filed must not be specified as 0.)
15
(0899H) LXE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-X 0: Disable 1: Enable
14
13
12
11
10
9
8
X8 R/W 0
Specify the bank number for the LOCAL-X area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 011111111 CSXA 100000000 to 111111111 CSXB
LOCAL-Y Register for Write Data 7
LOCALWY Bit Symbol (089AH) Read/Write Reset State Function
6
5
Y5 0
4
Y4
3
Y3 R/W
2
Y2
1
Y1
0
Y0
0 0 0 0 0 Specify the bank number for the LOCAL-Y area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(089BH) LYE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-Y 0: Disable 1: Enable
14
13
12
11
10
9
8
92CF26A-214
2007-11-21
TMP92CF26A
LOCAL-Z Register for Write Data 7
LOCALWZ (089CH) Bit Symbol Read/Write Reset State Function Z7 0
6
Z6 0
5
Z5
4
Z4 R/W
3
Z3
2
Z2
1
Z1
0
Z0
0 0 0 0 0 0 Specify the bank number for the LOCAL-Z area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(089DH) LZE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-Z 0: Disable 1: Enable
14
13
12
11
10
9
8
Z8 R/W 0
Specify the bank number for the LOCAL-Z area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 001111111 CSZA 100000000 to 101111111 CSZC 010000000 to 011111111 CSZB 110000000 to 111111111 CSZD
92CF26A-215
2007-11-21
TMP92CF26A
3.9.2.5 DMA-Function Bank Registers
The TMP92CF26A supports not only the read and write operations of the CPU, but also the high-speed data transfer by enabling the internal DMAC to become the bus master. (Please refer to Section 3.6, "DMA Controller".) These registers are provided specially for the DMA operation, separately from the bank registers for the CPU and LCDC. Regardless of the settings of the bank registers for program, read and write data of the CPU, the banks to be used as source address memory and destination address memory are specified individually during DMA operations. The DMAC of the TMP92CF26A supports six channels, and the bank control is performed by dividing those channels into 2 groups. The DMA channels with the even-channel number, 0, 2 and 4, are classified into the E-group (ES and ED groups); while the channels with the odd-channel number, 1 and 3, are classified into the O-group (OS and OD groups). These registers cannot specify bank numbers for each channel, but specifies one bank number for all the channels in the same group. The following example shows how to specify bank 1 for storing DMA-source addresses in the LOCAL-X area, and also specify bank 2 for storing DMA-destination addresses in the LOCAL-Y area. If the DMA operation for channel 0 is initiated Assume that the source and destination addresses specified by the DMA operation, which is described in Section 3.6, are set into the LOCAL-X and LOCAL-Y areas, respectively. Then, if the DMA operation for channel 0 is initiated, bank 1 in the LOCAL-X area is configured as the source address memory, and bank 2 in the LOCAL-Y area is configured as the destination address memory.
(Example) ldw ldw (localesx), 8001h (localedy), 8002h ; ; Specify DMA-source bank number for channel 0 Specify DMA-destination bank number for channel 0
DMA operation for channel 0 is started
92CF26A-216
2007-11-21
TMP92CF26A
LOCAL-X Register for the E-group DMA Source 7
LOCALESX Bit Symbol (08A0H) Read/Write Reset State Function X7 0
6
X6 0
5
X5
4
X4
3
X3
2
X2
1
X1
0
X0
R/W 0 0 0 0 0 0 Specify the bank number for the LOCAL-X area (Since bank 0 is overlapping with the COMMON area, this filed must not be specified as 0.)
15
(08A1H) Bit Symbol Read/Write Reset State Function Bank for LOCAL-X 0: Disable 1: Enable LXE R/W 0
14
13
12
11
10
9
8
X8 R/W 0
Specify the bank number for the LOCAL-X area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 011111111 CSXA 100000000 to 111111111 CSXB
LOCAL-Y Register for the E-group DMA Source 7
LOCALESY Bit Symbol (08A2H) Read/Write Reset State Function
6
5
Y5 0
4
Y4
3
Y3 R/W
2
Y2
1
Y1
0
Y0
0 0 0 0 0 Specify the bank number for the LOCAL-Y area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(08A3H) Bit Symbol Read/Write Reset State Function Bank for LOCAL-Y 0: Disable 1: Enable LYE R/W 0
14
13
12
11
10
9
8
LOCAL-Z Register for the E-group DMA Source 7
LOCALESZ Bit Symbol (08A4H) Read/Write Reset State Function Z7 0
6
Z6 0
5
Z5
4
Z4 R/W
3
Z3
2
Z2
1
Z1
0
Z0
0 0 0 0 0 0 Specify the bank number for the LOCAL-Z area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3)
15
(08A5H) LZE Bit Symbol R/W Read/Write 0 Reset State Function BANK for LOCAL-Z 0: Disable 1: Enable
14
13
12
11
10
9
8
Z8 R/W 0
Specify the bank number for the LOCAL-Z area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 001111111 CSZA 100000000 to 101111111 CSZC 010000000 to 011111111 CSZB 110000000 to 111111111 CSZD
92CF26A-217
2007-11-21
TMP92CF26A
LOCAL-X Register for the E-group DMA Destination 7
LOCALEDX Bit Symbol (08A8H) Read/Write Reset State Function X7 0
6
X6 0
5
X5
4
X4
3
X3
2
X2
1
X1
0
X0
R/W 0 0 0 0 0 0 Specify the bank number for the LOCAL-X area (Since bank 0 is overlapping with the COMMON area, this filed must not be specified as 0.)
15
(08A9H) Bit Symbol Read/Write Reset State Function Bank for LOCAL-X 0: Disable 1: Enable LXE R/W 0
14
13
12
11
10
9
8
X8 R/W 0
Specify the bank number for the LOCAL-X area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 011111111 CSXA 100000000 to 111111111 CSXB
LOCAL-Y Register for the E-group DMA Destination 7
LOCALEDY Bit Symbol (08AAH) Read/Write Reset Function
6
5
Y5 0
4
Y4
3
Y3 R/W
2
Y2
1
Y1
0
Y0
0 0 0 0 0 Specify the bank number for the LOCAL-Y area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(08ABH) Bit Symbol Read/Write Reset Function LYE R/W 0 Bank for LOCAL-Y 0: Disable 1: Enable
14
13
12
11
10
9
8
LOCAL-Z Register for the E-group DMA Destination 7
LOCALEDZ Bit Symbol (08ACH) Read/Write Reset State Function Z7 0
6
Z6 0
5
Z5
4
Z4 R/W
3
Z3
2
Z2
1
Z1
0
Z0
0 0 0 0 0 0 Specify the bank number for the LOCAL-Z area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(08ADH) LZE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-Z 0: Disable 1: Enable
14
13
12
11
10
9
8
Z8 R/W 0
Specify the bank number for the LOCAL-Z area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 001111111 CSZA 100000000 to 101111111 CSZC 010000000 to 011111111 CSZB 110000000 to 111111111 CSZD
92CF26A-218
2007-11-21
TMP92CF26A
LOCAL-X Register for the O-group DMA Source 7
LOCALOSX Bit Symbol (08B0H) Read/Write Reset State Function X7 0
6
X6 0
5
X5
4
X4 R/W
3
X3
2
X2
1
X1
0
X0
0 0 0 0 0 0 Specify the bank number for the LOCAL-X area (Since bank 0 is overlapping with the COMMON area, this filed must not be specified as 0.)
15
(08B1H) LXE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-X 0: Disable 1: Enable
14
13
12
11
10
9
8
X8 R/W 0
Specify the bank number for the LOCAL-X area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 011111111 CSXA 100000000 to 111111111 CSXB
LOCAL-Y Register for the O-group DMA Source 7
LOCALOSY Bit Symbol (08B2H) Read/Write Reset State Function
6
5
Y5 0
4
Y4
3
Y3 R/W
2
Y2
1
Y1
0
Y0
0 0 0 0 0 Specify the bank number for the LOCAL-Y area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(08B3H) Bit Symbol Read/Write Reset State Function LYE R/W 0 Bank for LOCAL-Y 0: Disable 1: Enable
14
13
12
11
10
9
8
LOCAL-Z Register for the O-group DMA Source 7
LOCALOSZ Bit Symbol (08B4H) Read/Write Reset State Function Z7
6
Z6
5
Z5
4
Z4 R/W
3
Z3
2
Z2
1
Z1
0
Z0
0 0 0 0 0 0 0 0 Specify the bank number for the LOCAL-Z area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(08B5H) LZE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-Z 0: Disable 1: Enable
14
13
12
11
10
9
8
Z8 R/W 0
Specify the bank number for the LOCAL-Z area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 001111111 CSZA 100000000 to 101111111 CSZC 010000000 to 011111111 CSZB 110000000 to 111111111 CSZD
92CF26A-219
2007-11-21
TMP92CF26A
LOCAL-X Register for the O-group DMA Destination 7
LOCALODX Bit Symbol (08B8H) Read/Write Reset State Function X7 0
6
X6 0
5
X5
4
X4 R/W
3
X3
2
X2
1
X1
0
X0
0 0 0 0 0 0 Specify the bank number for the LOCAL-X area (Since bank 0 is overlapping with the COMMON area, this filed must not be specified as 0.)
15
(08B9H) LXE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-X 0: Disable 1: Enable
14
13
12
11
10
9
8
X8 R/W 0
Specify the bank number for the LOCAL-X area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 011111111 CSXA 100000000 to 111111111 CSXB
LOCAL-Y Register for the O-group DMA Destination 7
LOCALODY Bit Symbol (08BAH) Read/Write Reset State Function
6
5
Y5 0
4
Y4
3
Y3
2
Y2
1
Y1
0
Y0
R/W 0 0 0 0 0 Specify the bank number for the LOCAL-Y area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(08BBH) LYE Bit Symbol R/W Read/Write 0 Reset State Function BANK for LOCAL-Y 0: Disable 1: Enable
14
13
12
11
10
9
8
LOCAL-Z Register for the O-group DMA Destination 7
LOCALODZ Bit Symbol (08BCH) Read/Write Reset State Function Z7 0
6
Z6 0
5
Z5 0
4
Z4 R/W 0
3
Z3 0
2
Z2 0
1
Z1 0
0
Z0 0
Specify the bank number for the LOCAL-Z area (Since bank 3 is overlapping with the COMMON area, this filed must not be specified as 3.)
15
(08BDH) LZE Bit Symbol R/W Read/Write 0 Reset State Function Bank for LOCAL-Z 0: Disable 1: Enable
14
13
12
11
10
9
8
Z8 R/W 0
Specify the bank number for the LOCAL-Z area Settings of the X8 through X0 bits and their corresponding chip select signals 000000000 to 001111111 CSZA 100000000 to 101111111 CSZC 010000000 to 011111111 CSZB 110000000 to 111111111 CSZD
92CF26A-220
2007-11-21
TMP92CF26A 3.9.3 Programming example
The conditions listed in this table apply the following programming examples. No.
(a) (b) (c) (d)
Used as
Main Routine CharacterROM Subroutine
Memory
NOR-Flash (16 MB, 1 pcs)
Setting
CSZA ,
MMU area
COMMON-Z Bank 0 in LOCAL-Z Bank 0 in LOCAL-Y
Logical address
Physical address
C00000H to FFFFFFH 800000H to BFFFFFH 000000H to 3FFFFFH 000000H to 1FFFFFH
32 bit, 1 wait state
SRAM LCD Display-RAM (16 MB, 1 pcs)
CS1 , 16 bit, 0 wait state ---(32 bit, 2-1-1-1clk)
400000H to 5FFFFFH
Bank 1 in LOCAL-Y Bank 2 in LOCAL-Y
200000H to 3FFFFFH 002000H to 049FFFH
(e)
StackRAM
On-chip-RAM (144KB)
(a) Main Routine (COMMON-Z) Logical Address
C00000H C000xxH
Physical Address
<-(Same) <-
Instruction No.
1 2 3 4 5 5.1 5.2 6 7 9 10 11 org ldw ldw ldw ldw ldw ldw ld ld ld ldw : call : : :
Instruction
C00000H (mamr2),80FFH (b2csl), C222H (mamr1),40FFH (b1csl), 8111H (localpz),8000H (localrz),8000H (p8fc), 02H (p8fc2), 04H xsp,48000H (localpy),8000H ;
Comment
; CS2 800000-FFFFFF/8MB ; CS2 32-bit ROM, 1 wait state ; CS1 400000-7FFFFF/4MB ; CS1 16-bit RAM, 0 wait state ; Enable LOCAL-Z bank for program ; Enable LOCAL-Z bank for read-data ; ; ; Stack Pointer = 48000H ; Bank 0 in LOCAL-Y is configured as the program bank for subroutines ;
C000yyH
<-
12 13 14 15
400000H
; Call a subroutine ; ; ;
* * * *
The instructions No.2 through No.8 configure external pins and the Memory Controller. The instruction No.9 specifies the stack pointer value. The stack pointer is herein specified to point to the memory location in on-chip RAM. The instruction No.10 configures the setting used for a subroutine call instruction of No.12. The instruction No.12 calls a subroutine. When the CPU generates the address 400000H, the MMU translates it to the physical address 000000H, which is then placed onto the external address bus: A23 to A0. Since the logical address is within the address range of the CS1 space, CS1 for SRAM is asserted at the same time. By using these instructions, the program execution of the CPU can be branched to the subroutine.
Note: This example assumes that the subroutine program is already written into SRAM.
92CF26A-221
2007-11-21
TMP92CF26A
(b) Subroutine (Bank 0 in LOCAL-Y) Logical address
400000H 4000xxH
Physical address
000000H 0000xxH
Instruction No.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ld ld ld : : ld ld ld : ret org ldw ldw ldw ld ld :
Instruction
400000H (localwy),8001H (locally), 8001H (localrz), 8001H xiy,800000H wa,(xiy) (localpy), 82H xix, 400000H (xix), bc ;
Comment
; Bank 1 in LOCAL-Y is configured as write-data memory for LCD Display RAM ; Bank 1 in LOCAL-Y is configured as LCD display RAM ; Bank 0 in LOCAL-Z is configured as read-data memory for Character-RAM ; Index address register for reading Character-ROM ; Read Character-ROM ; Convert the read data to display-data ; ; Index address register for writing LCD Display data ; Write LCD Display data ; Configure the LCD Controller ; ; Load the LCD Start address into LCDC ; ; Start LCD Display operation ; ;
xiz, 400000H (lsarcl), xiz (lcdctl0),01H
5000yyH
1000yyH
32
*
The instructions No.17 and No.18 configure bank 1 of the LOCAL-Y area. In this case, the CPU writes the LCD Display data to Display RAM, and the data is then read by the LCDC. Thus, the LOCALWY and LOCALLY registers should be programmed to specify the same bank, bank1. The instruction No.19 configures Bank 0 of the LOCAL-Z area to read data from character-ROM. The instructions No.20 and No.21 are used to read data from character-ROM. When the CPU generates the address 800000H, the MMU translates it to the physical address 000000H, which is then placed onto the external address bus: A23 to A0. Since the logical address is within the address range of the CS2 space, CSZA for NOR-Flash is asserted at the same time. By using these instructions, the CPU can read data from character ROM. The instruction No.23switches the program bank in the LOCAL area. Since the program bank switching within the same LOCAL area is prohibited, this is a bad example. The instructions No.24 and No.25 are used to write data to SRAM. When the CPU generates the address 400000H, the MMU translates it to the physical address 200000H, which is then placed onto the external address bus: A23 to A0. Since the logical address is within the address range of the CS1 space, CS1 for SRAM is asserted at the same time. By using these instructions, the CPU can write data to SRAM. The instructions No.28 and No.29 load the LCD starting address into the LCD Controller. When the LCDC generates the address 400000H in a DMA cycle, the MMU translates it to the physical address 200000H, which is then placed onto the external address bus: A23 to A0. Since the logical address is within the address range of the CS1 space, CS1 for SRAM is asserted at the same time. By using these instructions, the LCDC can read data from SRAM. The instruction No.30 starts LCD display operation.
* *
* *
*
*
92CF26A-222
2007-11-21
TMP92CF26A
3.10 SDRAM Controller (SDRAMC)
The TMP92CF26A incorporates an SDRAM controller (SDRAMC) for accessing SDRAM that can be used as data memory, program memory, or display memory. The SDRAMC has the following features: (1) Supported SDRAM Data rate type Memory capacity Number of banks Data bus width Read burst length Write mode : SDR (single data rate) type only : 16 / 64 / 128 / 256 / 512 Mbits : 2 banks / 4 banks : 16 bits : 1 word / full page : Single mode / Burst mode
(2) Supported initialization sequence commands Precharge All command Eight Auto Refresh commands Mode Register Set command (3) Access mode CPU Cycle
Burst length Addressing mode CAS latency (clock) Write mode 1 word Sequential 2 Single
HDMA Cycle
1 word or full page selectable Sequential 2 Single or burst selectable
LCDC Cycle
Full page Sequential 2
(4) Access cycles CPU access cycles Read cycle Write cycle Data size : 1 word, 4-3-3-3 states (minimum) : Single, 3-2-2-2 states (minimum) : 1 byte / 1 word / 1 long-word
HDMA access cycles Read cycle Write cycle Data size : 1 word, 4-3-3-3 states / full page, 4-1-1-1 states (minimum) : Single, 3-2-2-2 states (minimum) / burst, 2-1-1-1 states (minimum) : 1 byte / 1 word / 1 long-word
LCDC access cycles Read cycle Data size : Full page, 4-1-1-1 states (minimum) : 1 word
(5) Auto generation of refresh cycles * * * Auto Refresh is performed while the SDRAM is not being accessed. The Auto Refresh interval is programmable. The Self Refresh function is also supported.
Note: The SDRAM address area is determined by the CS1 or CS2 setting of the memory controller. However, the number of bus cycle states is controlled by the SDRAMC.
92CF26A-223
2007-11-21
TMP92CF26A 3.10.1 Control Registers
The SDRAMC has the following control registers. SDRAM Access Control Register 7
SDACR (0250H) Bit symbol Read/Write Reset State Function shift function 0: Disable 1: Enable 1 0 write "0" type 00: Type A (A9- ) 01: Type B (A10- ) 10: Type C (A11- ) 11: Reserved Read data Always SRDS
6
-
5
R/W 0
4
3
SPRE 0 Read/Write commands 0: Without auto precharge 1: With auto precharge
2
1
0
SMAC R/W 0 SDRAM controller 0: Disable 1: Enable
SMUXW1 SMUXW0 0
Address multiplex
SDRAM Command Interval Setting Register 7
SDCISR (0251H) Bit symbol Read/Write Reset State Function 1 TMRD 0: 1 CLK 1: 2 CLK TWR 0: 1 CLK 1: 2 CLK 1 TRP 0: 1 CLK 1: 2 CLK 1
6
STMRD
5
STWR
4
STRP
3
STRCD R/W 1 TRCD 0: 1 CLK 1: 2 CLK
2
STRC2 1 TRC 000: 1 CLK 001: 2 CLK 010: 3 CLK 011: 4 CLK
1
STRC1 0
0
STRC0 0 100: 5 CLK 101: 6 CLK 110: 7 CLK 111: 8 CLK
SDRAM Refresh Control Register 7
SDRCR (0252H) Bit symbol Read/Write Reset State Function - R/W 0 Always write "0" Self Refresh auto exit function 0:Disable 1:Enable 1 0 Refresh interval 000: 47 states 001: 78 states 100: 468 states 101: 624 states
6
5
4
SSAE
3
SRS2
2
SRS1 R/W 0
1
SRS0 0 Auto
0
SRC 0 Refresh 0:Disable 1:Enable
010: 156 states 110: 936 states 011: 312 states 111: 1248 states
92CF26A-224
2007-11-21
TMP92CF26A
SDRAM Command Register 7
SDCMM (0253H) Bit symbol Read/Write Reset State Function 0 000: Don't care 001: Initialization sequence a. Precharge All command b. Eight Auto Refresh commands c. Mode Register Set command 010: Precharge All command 100: Reserved 101: Self Refresh Entry command 110: Self Refresh Exit command Others: Reserved Note 1: is automatically cleared to "000" after the specified command is issued. Before writing the next command, make sure that is "000". In the case of the Self Refresh Entry command, however, is not cleared to "000" by execution of this command. Thus, this register can be used as a flag for checking whether or not Self Refresh is being performed. Note 2: The Self Refresh Exit command can only be specified while Self Refresh is being performed.
6
5
4
3
2
SCMM2
1
SCMM1 R/W 0
0
SCMM0 0
Command issue (Note 1) (Note 2)
SDRAM HDMA Burst Length Select Register 7
SDBLS (0254H) Bit symbol Read/Write Reset State Function For HDMA5 0 For HDMA4 0 For HDMA3 0 For HDMA2
6
5
SDBL5
4
SDBL4
3
SDBLS R/W
2
SDBL2 0 For
1
SDBL1 0 For HDMA1
0
SDBL0 0 HDMA0
HDMA burst length 0: 1 Word read / Single write 1: Full page read / Burst write
Figure 3.10.1 Control Registers
92CF26A-225
2007-11-21
TMP92CF26A 3.10.2 Operation Description
The SDRAMC is enabled by setting SDACR to "1". When one of the bus masters (CPU, LCDC, DMAC) generates a cycle to access the SDRAM address area, the SDRAMC outputs SDRAM control signals. Figure 3.10.2 to Figure3.10.5 shows the timing for accessing the SDRAM. The number of SDRAM access cycles is controlled by the SDRAMC and does not depend on the number of waits controlled by the memory controller. (a) Command issue function The SDRAMC issues commands as specified by the SDCMM register. The SDRAMC also issues commands automatically for each SDRAM access cycle generated by each bus master. Table 3.10.1 shows the commands that are issued by the SDRAMC. Table 3.10.1 Commands Issued by the SDRAMC
A15-11 Command CKEn-1 CKEn SDxxDQM A10 A9-0
(1) Memory access control
SDCS L L L L L L L L L L H
SDRAS SDCAS L L H H H H L H L L H H H L L L L L H L L H
SDWE H L H H L L L L H H H
Bank Activate Precharge All Read Read with Auto Precharge Write Write with Auto Precharge Mode Register Set Burst Stop Auto Refresh Self Refresh Entry Self Refresh Exit
H H H H H H H H H H L
H H H H H H H H H L H
H H L L L L H H H H H
RA H L H L H L X X X X
RA X CA CA CA CA M X X X X
Note 1: H = High level, L = Low level, RA = Row address, CA = Column address, M = Mode data, X = Don't care Note 2: CKEn = CKE level in the command input cycle CKEn-1 = CKE level in a cycle immediately before the command input cycle
92CF26A-226
2007-11-21
TMP92CF26A
(b)
Address multiplex function In access cycles, the A0 to A15 pins output low/column multiplexed addresses. The multiplex width is set by SDACR. Table 3.10.2 shows the relationship between the multiplex width and low/column addresses. Table 3.10.2 Address Multiplex SDRAM Access Cycle Address 92CF26A Pin Name
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15
Row Address
Type A = 00 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23 EA24 Type B = 01 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23 EA24 EA25 Type C = 10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 A21 A22 A23 EA24 EA25 EA26 Row Address A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 AP *
Column Address
*AP: Auto Precharge
(c)
Burst length When the CPU accesses the SDRAM, the burst length is fixed to 1-word read/single write. When the LCDC accesses the SDRAM, the burst length is fixed to full page. The burst length can be selected for SDRAM read and write accesses by HDMA if the following conditions are satisfied: * * The HDMA transfer mode is an increment mode. Transfers are made between the SDRAM and internal RAM or internal I/O.
In other cases, HDMA operation can only be performed in 1-word read/single write mode. Use SDBLS to set the burst length for each HDMA channel.
92CF26A-227
2007-11-21
TMP92CF26A
4CLK 3CLK 3CLK
SDCLK SDCKE SDLUDQM SDLLDQM
SDCS
SDRAS SDCAS
SDWE
A10 A15-A0 D15-D0
RA RA CA (n) D (n) tRCD= 1CLK CAS Latency=2CLK CA (n+2) D (n+2) CAS Latency=2CLK CA (n+4) D (n+4) CAS Latency=2CLK
Bank Active
Read
Read
Read
Figure 3.10.2 1-Word Read Cycle Timing
4CLK
1CLK
1CLK
Burst Stop Cycle 2CLK
SDCLK SDCKE SDLUDQM SDLLDQM
SDCS
SDRAS SDCAS
SDWE
A10 A15-A0 D15-D0
RA RA CA (n) D (n) tRCD= 1CLK CAS Latency=2CLK D (n+2) D (n+4) D(dmy)
A10 A15-0 D (dmy)
Bank Active
Read
Burst Stop
Figure 3.10.3 Full-Page Read Cycle Timing
92CF26A-228
2007-11-21
TMP92CF26A
3CLK
2CLK
2CLK
SDCLK SDCKE SDLUDQM SDLLDQM
SDCS
SDRAS SDCAS
SDWE
A10 A15-A0 D15-D0
RA RA D (n) tRCD= 1CLK tWR= 1CLK CA (n) CA (n+2) D (n+2) tWR= 1CLK CA (n+4) D (n+4) tWR= 1CLK
Bank Active
Write
Write
Write
Figure 3.10.4 Single Write Cycle Timing
2CLK
1CLK
1CLK
Burst Stop Cycle 2CLK
SDCLK SDCKE SDLUDQM SDLLDQM
SDCS
SDRAS SDCAS
SDWE
A10 A15-A0 D15-D0
RA RA D(n) tRCD= 1CLK CA(n) D(n+2) D(n+4) D(n+6) CA(n) D(end)
A10 A15-0
Bank Active
Write
Burst Stop
Figure3.10.5 Burst Write Cycle Timing
92CF26A-229
2007-11-21
TMP92CF26A
(2) Execution of instructions on SDRAM The CPU can execute instructions that are stored in the SDRAM. However, the following operations cannot be performed. a) Executing the HALT instruction b) Changing the clock gear setting c) Changing the settings in the SDACR, SDCMM, and SDCISR registers These operations, if needed, must be executed by branching to other memory such as internal RAM. (3) Command interval adjustment function Command execution intervals can be adjusted for each command. This function enables the SDRAM to be accessed at optimum cycles even if the operation frequency is changed by clock gear. Command intervals should be set in the SDCISR register according to the operating frequency of the TMP92CF26A and the AC specifications of the SDRAM. The SDCICR register must not be changed while the SDRAM is being accessed. The timing waveforms for various cases are shown below. (a) Mode Register Set command SDCLK COMMAND NOP MRS NOP
TMRD Next Command
NOP
*TMRD=2CLK (SDCISR= "1") (b) Auto Refresh command SDCLK
COMMAND NOP
AUTO REFRESH
NOP
NOP
NOP
TRC
NOP
Next Command
*TRC=5CLK (SDCISR= "100") (c) Self Refresh Exit SDCLK SDCKE COMMAND XXX NOP NOP NOP NOP TRC *TRC=5CLK (SDCISR= "100") Exit Self Refresh NOP
Next Command
92CF26A-230
2007-11-21
TMP92CF26A
(d) Precharge command SDCLK NOP
PRECHARGE
COMMAND
NOP
TRP
Next Command
NOP
*TRP=2CLK (SDCISR= "1") (e) Read cycle SDCLK COMMAND NOP A15-A0 D15-D0 ACTIVE Row Address NOP READ NOP NOP NOP ACTIVE
Column Address
Non MUX-address
Row Address
TRCD
DIN
TRC *TRCD=2CLK (SDCISR= "1") *TRC=6CLK (SDCISR= "101") (f) SDCLK COMMAND NOP A15-A0 D15-D0 TRCD ACTIVE Row Address NOP
WRITE NOP PRECHARG NOP ACTIVE
Write cycle
Column Address DOUT
Non MUX-address
Row Address
TWR
TRC
TRP
*TRCD=2CLK (SDCISR= "1") *TWR=2CLK (SDCISR= "1") *TRP=2CLK (SDCISR= "1") *TRC=6CLK (SDCISR= "101")
92CF26A-231
2007-11-21
TMP92CF26A
(4) Read data shift function If the AC specifications of the SDRAM cannot be satisfied when data is read from the SDRAM, the read data can be latched in a port circuit so that the CPU can read the data in the next state. When this read data shift function is used, the read cycle requires additional one state. The write cycle is not affected. The timing waveforms for various cases are shown below. (a) 1-word read, the read data shift function disabled (SDACR = "0") SDCLK
COMMAND
NOP
ACTIVE Row Address
READ
NOP
NOP
ACTIVE Row Address
READ
Column Address
A15-A0 D15-D0
Internal system clock Internal dat bus
ColumnAddress DIN1
DIN1 CPU data read
(b) 1-word read, the read data shift function enabled (SDACR = "1", = "0")
SDCLK COMMAND NOP A15-A0 D15-D0
Internal system clock
ACTIVE Row Address
READ
NOP
NOP
NOP
ACTIVE Row Address
ColumnAddress DIN1
Internal data bus
DIN1 External data latch CPU data read
92CF26A-232
2007-11-21
TMP92CF26A
(c) Full-page read, the read data shift function enabled (SDACR = "1", = "0") SDCLK COMMAND NOP A15-A0 D15-D0
Internal system clock Internal data bus
ACTIVE Row Address
READ
NOP
NOP ColumnAddress DIN1
NOP
NOP
DIN2
DIN3
DIN1 External data latch
DIN2
DIN3
CPU data read
(5) Read/Write commands The Read/Write commands to be used in 1-word read/single write mode can be specified by using SDACR. When SDACR is set to "1", the Read/Write commands are executed with Auto Precharge. When Auto Precharge is enabled, the SDRAM is automatically precharged internally at every access cycle. Thus, the SDRAM is always in a "bank idle" state while it is not being accessed. This helps reduce the power consumption of the SDRAM but at the cost of degradation in performance as the Bank Active command is needed at every access cycle. When SDACR is set to "0", the Read/Write commands are executed without Auto Precharge. In this case, the SDRAM is not precharged at every access cycle and is always in a "bank active" state. This increases the power consumption of the SDRAM, but improves performance as there is no need to issue the Bank Active command at every access cycle. If an access is made to outside the SDRAM page boundaries or if the Auto Refresh command is issued, the SDRAMC automatically issues the Precharge All command. And this micro has LCD controller and DMA controller, in case of using below condition, there is one limitation. When SDRAM is set as VRAM for LCD controller and DMA controller is operated at the same time, always set to "1" to SDACR.
92CF26A-233
2007-11-21
TMP92CF26A
(6) Refresh control The TMP92CF26A supports two kinds of refresh commands: Auto Refresh and Self Refresh. (a) Auto Refresh When SDRCR is set to "1", the Auto Refresh command is automatically issued at intervals specified by SDRCR. The Auto Refresh interval can be specified in a range of 47 states to 1248 states (0.78 s to 20.8 s at f SYS = 60 MHz). The CPU operation (instruction fetch and execution) is halted while the Auto Refresh command is being executed. Figure 3.10.6 shows the Auto Refresh cycle timing, and Table 3.10.3 shows the Auto Refresh interval settings. The Auto Refresh function cannot be used in IDLE1 and STOP modes. In these modes, use the Self Refresh function to be explained next.
Note: A system reset disables the Auto Refresh function.
2 states SDCLK SDCKE SDLUDQM SDLLDQM
SDCS SDRAS
SDCAS SDWE
Auto Refresh
Figure 3.10.6 Auto Refresh Cycle Timing
Note1: Set the interval of Auto Refresh as below table for your reference. Note2: Take care SDRAM specification and CPU operation speed, please.
Table 3.10.3 System clock speed & auto refresh interval SDRCR interval SRS2 SRS1 SRS0 state
0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 47 78 156 312 468 624 936 1248
Frequency: system clock [ MHz ] 1 2 3 4 6 8 10 20 30 40 60 80 Time: auto refresh interval [ S ]
47.0 78.0 156.0 312.0 468.0 624.0 936.0 23.5 39.0 78.0 156.0 234.0 312.0 468.0 15.67 26.0 52.0 104.0 156.0 208.0 312.0 416.0 11.75 19.5 39.0 78.0 117.0 156.0 234.0 312.0 7.83 13.0 26.0 52.0 78.0 104.0 156.0 208.0 5.88 9.75 19.5 39.0 58.5 78.0 117.0 156.0 4.70 7.80 15.60 31.2 46.8 62.4 93.6 124.8 2.35 3.9 7.8 15.60 23.4 31.2 46.8 62.4 1.57 2.60 5.20 10.4 15.60 20.8 31.2 41.6 1.18 1.95 3.90 7.80 11.7 15.60 23.4 31.2 0.78 1.30 2.60 5.20 7.80 10.4 15.60 20.8 0.59 0.98 1.95 3.90 5.85 7.80 11.70 15.60
1248.0 624.0
Note: Above gray zone is prohibited to set. SDRAM request: 4096 times per 64mS.
92CF26A-234
2007-11-21
TMP92CF26A
(b) Self Refresh The Self Refresh Entry command is issued by setting SDCMM to "101". Figure 3.10.7 shows the Self Refresh cycle timing. Before entering Self-refresh mode, issue the all Bank Pre-charge Command. Once Self Refresh is started, the SDRAM is refreshed internally without the need to issue the Auto Refresh command.
Note 1: When standby mode is released by a system reset, the I/O registers are initialized and the Self Refresh state is exited. Note that the Auto Refresh function is also disabled at this time. Note 2: The SDRAM cannot be accessed while it is in the Self Refresh state. Note 3: To execute the HALT instruction after the Self Refresh Entry command, insert at least 10 bytes of NOP or other instructions between the instruction to set SDCMM to "101" and the HALT instruction.
SDCLK SDCKE SDLUDQM SDLLDQM
SDCS
SDRAS
SDCAS
SDWE
Self Refresh Entry Self Refresh Exit Auto Refresh Mode Set
Figure 3.10.7 Self Refresh Cycle Timing
Setting Example org 0x2000 ld (sdcmm),0x02 ld (sdcmm),0x05 dl 0,0
dl dl halt dl ld dl
0,0 0,0 0 (sdcmm),0x06 0
; ; ; ; ; ; ; ; ; ; ; ;
Internal RAM All Bank Precharge Command Self Refresh Entry Command Reduce power consumption (like SDCLK stop)
Self Refresh Exit Command
92CF26A-235
2007-11-21
TMP92CF26A
The Self Refresh state can be exited by the Self Refresh Exit command. The Self Refresh Exit command is executed when SDCMM is set to "110". It is also executed automatically in synchronization with HALT mode release. In either of these two cases, Auto Refresh is performed immediately after the Self Refresh state is exited. Then, Auto Refresh is executed at specified intervals. Exiting the Self Refresh state clears SDCMM to "000". SDRAM Refresh Control Register 7
SDRCR (0252H) Bit symbol Read/Write Reset State Function
-
6
5
4
SSAE 1 Self Refresh auto exit function 0:Disable 1:Enable
3
SRS2 0 Refresh interval 000: 47 states 001: 78 states 010: 156 states 011: 312 states
2
SRS1 R/W 0
1
SRS0 0
0
SRC 0 Auto Refresh 0:Disable 1:Enable
R/W 0 Always write "0"
100: 468 states 101: 624 states 110: 936 states 111: 1248 states
Setting SDRCR to "1" enables automatic execution of the Self Refresh Exit command in synchronization with HALT release. Setting SDRCR to "0" disables automatic execution of the Self Refresh Exit command in synchronization with HALT release. The auto exit function should also be disabled in cases where the SDRAM operation requirements cannot be met as the operation clock frequency is reduced by clock gear down, as shown in Figure 3.10.8.
Gear down
fSYS 60MHz 625 KHz (10MHz/16) CPU Auto-EXIT disable SR ENTRY
CLK change
Gear up
Interrupt
HALT HALT mode
CLK change
SR EXIT
Auto-EXIT enable
SDRAM controller internal state Auto Exit enable Auto Exit disable Auto Exit enable
SDRAM state Auto Refresh Self Refresh Auto Refresh
Figure 3.10.8 Execution Flow for Executing HALT Instruction after Clock Gear Down
92CF26A-236
2007-11-21
TMP92CF26A
(7) SDRAM initialization sequence After reset release, the following sequence of commands can be executed to initialize the SDRAM. Precharge All command Eight Auto Refresh commands Mode Register Set command The above commands are issued by setting SDCMM to "001". While these commands are issued, the CPU operation (instruction fetch, execution) is halted. Before executing the initialization sequence, appropriate port settings must be made to enable the SDRAM control signals and address signals (A0 to A15). After the initialization sequence is completed, SDCMM is automatically cleared to "000".
Eight Auto Refresh commands
SDCLK SDCKE SDLUDQM SDLLDQM
SDCS SDRAS
SDCAS
SDWE
A10 A15-A0 627 227
Precharge All
Auto Refresh
Auto Refresh
Auto Refresh
Auto Refresh
Auto Refresh
Mode Register Set
Figure3.10.9 Initialization Sequence Timing
92CF26A-237
2007-11-21
TMP92CF26A
(8) Connection example Figure 3.10.10 shows an example of connections between the TMP92CF26A and SDRAM. Table 3.10.4 Pin Connections 92CF26A Pin Name 16M
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15
SDCS
SDRAM Pin Name Data Bus Width 16 bits 64M
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 BS0 BS1
- -
128M
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 BS0 BS1
- -
256M 512M
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 BS0 BS1
-
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 BS
- - - -
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 BS0 BS1
-
CS UDQM LDQM RAS CAS WE CKE CLK 00: TypeA
CS UDQM LDQM RAS CAS WE CKE CLK 00: TypeA
CS UDQM LDQM RAS CAS WE CKE CLK 01: TypeB
CS UDQM LDQM RAS CAS WE CKE CLK 01: TypeB
CS UDQM LDQM RAS CAS WE CKE CLK 10: TypeC
SDLUDQM SDLLDQM
SDRAS SDCAS SDWE
SDCKE SDCLK SDACR
: Command address pin of SDRAM
TMP92CF26A
SDCLK SDCKE A13 A12 A11-A0 D15-D0 SDRAS SDCAS SDWE SDCS SDLUDQM SDLLDQM CLK CKE BS1 BS0 A11-A0 D15-D0 RAS CAS WE CS UDQM LDQM 1 Mword x 4 banks x 16 bits
Figure 3.10.10 An Example of Connections between TMP92CF26A and SDRAM
92CF26A-238
2007-11-21
TMP92CF26A 3.10.3 An Example of Calculating HDMA Transfer Time
The following shows an example of calculating the HDMA transfer time when SDRAM is used as the transfer source.
*
Transfer from SDRAM to internal SRAM Conditions: System clock (fSYS) SDRAM read cycle 16-bit data bus SDRAM Auto Refresh interval: 936 states (15.6 s) Internal RAM write cycle Number of bytes to transfer Calculation example: Transfer time = (SDRAM read time + SRAM write time) x transfer count + (SDRAM burst start + stop time) + (Precharge time + Auto Refresh time) x Auto Refresh count (a) Read/write time (SDRAM read 1 state x 2 + Internal RAM write 1 state) x 512 bytes/4 bytes = 384 states x 1/60 MHz = 6.4 s (b) Burst start/stop time Start (TRCD: 2CLK) 5 states + Stop 2 states = 7states/60 MHz = 0.117 s (c) Auto Refresh time Based on the above (a), Auto Refresh occurs once or zero times in 384 states. It is assumed that Auto Refresh occurs once here. (Precharge (TRP: 2CLK) 2 states + AREF (TRC: 5CLK) 5 states) xAREF once = 7 states x 1/60 MHz = 0.117 s Total transfer time = (a) + (b) + (c) = 6.4 s + 0.117 s + 0.117 s = 6.634 s : 1 state, 32-bit data bus : 512 bytes : 60 MHz : Full page (5-1-1-1), 16-bit data bus
92CF26A-239
2007-11-21
TMP92CF26A 3.10.4 Considerations for Using the SDRAMC
This section describes the points that must be taken into account when using the SDRAMC. Please carefully read the following to ensure proper use of the SDRAMC. 1) WAIT access When SDRAM is used, the following restriction applies to memory access to other than the SDRAM. In the external WAIT pin input setting of the memory controller, the maximum external WAIT period that can be set is limited to "Auto Refresh interval x 8190". 2) Execution of the Self Refresh Entry, Initialization Sequence, or Precharge All command before the HALT instruction Execution of the commands issued by the SDRAMC (Self Refresh Entry, Initialization Sequence, Precharge All) requires several states after the SDCMM register is set. Therefore, to execute the HALT instruction after one of these commands, be sure to insert at least 10 bytes of NOP or other instructions. 3) Auto Refresh interval setting When SDRAM is used, the system clock frequency must be set to satisfy the minimum operation frequency and minimum Auto Refresh interval of the SDRAM to be used. In a system in which SDRAM is used and the clock is geared up and down, the Auto Refresh interval must be set carefully. Before changing the Auto Refresh interval, ensure that SDRCR is set to "0" to disable the Auto Refresh function. 4) Changing SFR settings Before changing the settings of the SDACR and SDCISR registers, ensure that the SDRAMC is disabled (SDACR ="0"). 5) Disabling the SDRAMC Set the following procedure, when disable the SDRAMC.
LD LD CP JP LD (SDCMM),0x02 A,(SDCMM) A,0x00 NZ,LOOP (SDACR),0x00 ; ; ; ; ; Issue to All Bank Precharge Read SDCMM Palling it until the All Bank Precharge command is finished Stop the SDRAM controller
LOOP:
6) Using LCDC, DMAC with SDRAMC And this micro has LCD controller and DMA controller, in case of using below condition, there is one limitation. When SDRAM is set as VRAM for LCD controller and DMA controller is operated at the same time, always set to "1" to SDACR.
92CF26A-240
2007-11-21
TMP92CF26A
3.11 NAND Flash Controller (NDFC)
3.11.1 Features
The NAND Flash Controller (NDFC) is provided with dedicated pins for connecting with NAND Flash memory. The NDFC also has an ECC calculation function for error correction and supports two types of ECC calculation methods. The ECC calculation method using Hamming codes can be used for NAND Flash memory of SLC (Single Level Cell) type and is capable of detecting a single-bit error for every 256 bytes. The ECC calculation method using Reed-Solomon codes can be used for NAND Flash memory of MLC (Multi Level Cell) type and is capable of detecting four error addresses for every 518 bytes. Although the NDFC has two channels (channel 0, channel 1), all pins except for Chip Enable are shared between the two channels. Only the operation of channel 0 is explained here. The NDFC has the following features: 1) Controls the NAND Flash memory interface through registers. 2) Supports 8-bit and 16-bit NAND Flash memory devices. 3) Supports page sizes of 512 bytes and 2048 bytes. 4) Supports large-capacity block sizes over 256 Kbytes. 5) Includes an ECC generation circuit using Hamming codes (for SLC type). 6) Includes a 4-address (4-byte) error detection circuit using Reed-Solomon coding/ encoding techniques (for MLC type).
Note 1: The WP (Write Protect) pin of NAND Flash is not supported. If this function is needed, prepare it on an external circuit. Note 2: The two channels cannot be accessed simultaneously. It is necessary to switch between the two channels.
92CF26A-241
2007-11-21
TMP92CF26A 3.11.2 Block Diagram
NAND Flash Controller Channel 0 (NDFC0)
Hamming ECC Generator ECC Code
ND_CE* ND_ALE ND_CLE ND_RE* Timing Generator ND WE* ND_RB*
ND0CE
Internal Data Bus
NDCLE, NDALE, NDRE , NDWE , D15~ D0
RS ECC Write Control Register Reed-Solomon ECC Generator DATA_OUT[15:0] F/F 80-bit Address Data Reed-Solomon ECC Calculator DATA_IN[15:0] D15~D0, NDR/B
Figure 3.11.1 Block Diagram for NAND Flash Controller
92CF26A-242
2007-11-21
TMP92CF26A 3.11.3 Operation Description
The NDFC accesses data on NAND Flash memory indirectly through its internal registers. This section explains the operations for accessing the NAND Flash. Since no dedicated sequencer is provided for generating commands to the NAND Flash, the levels of the NDCLE, NDALE, and NDCE pins must be controlled by software.
3.11.3.1 Accessing NAND Flash Memory
NDCLE
NDALE
NDCE
NDRE
NDWE
NDR/B
D15D0
NDFMCR0 = 1
NDFMCR0 = 0 NDFMCR0 = 1
ND0FMCR = 0
NDFMCR0 = 1
Figure3.11.2 Basic Timing for Accessing NAND Flash
92CF26A-243
2007-11-21
TMP92CF26A
The NDRE and NDWE signals are explained next. Write and read operations to and from the NAND Flash are performed through the ND0FDTR register. The actual write operation completes not when the ND0FDTR register is written to but when the data is written to the external NAND Flash. Likewise, the actual read operation completes not when the ND0FDTR register is read but when the data is read from the external NAND Flash. At this time, the Low and High widths of NDRE and NDWE can be adjusted according to the CPU operating speed (fSYS) and the access time of the NAND Flash. (For details, refer to the electrical characteristics.) The following shows an example of accessing the NAND Flash in 6 clocks by setting NDFMCR0=2 and NDFMCR0=2. (In write cycles, the data drive time also becomes longer.)
Program Memory Read (1wait) NAND Flash Read Program Memory Read (1 wait)
fSYS A23A0
FF1234H
001FF0H
FF1238H
CS2
RD
SRWR
NDCLE
NDALE
NDCE
2clk
NDRE
NDWE
2clk
NDR/B D15 D0
IN (Program)
IN (NAND Flash)
IN (Program)
Program Memory Read (1 wait)
NAND Flash Write
Program Memory Read (1 wait)
fSYS A23A0 CS2
FF1234H 001FF0H FF1238H
RD
SRWR
NDCLE NDALE
2clk
NDCE
NDRE
NDWE
NDR/B D15 D0
IN (Program) OUT (NAND Flash) IN (Program) 2clk
Figure3.11.3 Read/Write Access to NAND Flash
92CF26A-244
2007-11-21
TMP92CF26A 3.11.4 ECC Control
NAND Flash memory devices may inherently include error bits. It is therefore necessary to implement the error correction processing using ECC (Error Correction Code). Figure3.11.4 shows a basic flowchart for ECC control.
Data Write Data Read
Valid data write to NAND Flash Valid data write to ECC generator
Valid data read from NAND Flash Valid data write to ECC generator
ECC read from ECC generator
ECC read from NAND Flash
Write ECC to NAND Flash
ECC read from ECC circuit
END Yes Is there error ? Error correction process
No END
Figure3.11.4 Basic Flow of ECC Control
Write: 1. 2. When data is written to the actual NAND Flash memory, the ECC generator in the NDFC simultaneously generates ECC for the written data. The ECC is written to the redundant area in the NAND Flash separately from the valid data.
Read: 1. 2. When data is read from the actual NAND Flash memory, the ECC generator in the NDFC simultaneously generates ECC for the read data. The ECC for the written data and the ECC for the read data are compared to detect and correct error bits.
92CF26A-245
2007-11-21
TMP92CF26A
3.11.4.1 Differences between Hamming Codes and Reed-Solomon Codes The NDFC includes an ECC generator supporting NAND Flash memory devices of SLC (or 2LC: two states) type and MLC (or 4LC: four states) type. The ECC calculation using Hamming codes (supporting SLC) generates 22 bits of ECC for every 256 bytes of valid data and is capable of detecting and correcting a single-bit error for every 256 bytes. Error bit detection calculation and correction must be implemented by software. When using SmartMediaTM, Hamming codes should be used. The ECC calculation using Reed-Solomon codes (supporting MLC) generates 80 bits of ECC for every 1 byte to 518 bytes of valid data and is capable of detecting and correcting error bits at four addresses for every 518 bytes. When using Reed-Solomon codes, error bit detection calculation is supported by hardware and only error bit correction needs to be implemented by software. The differences between Hamming codes and Reed-Solomon codes are summarized in Table 3.11.1. Table 3.11.1 Differences between Hamming Codes and Reed-Solomon Codes Hamming
Maximum number of correctable errors Number of ECC bits Error bit detection method Error bit correction method Error bit detection time Others 1 bit 22 bits/256 bytes Software Software Depends on the software to be used. Supports SmartMediaTM.
Reed-Solomon
4 addresses (All the 8 bits at one address are correctable.) 80 bits/up to 518 bytes Hardware Software See the table below. -
Number of Error Bits
4 3 2 1 0
Reed-Solomon Error Bit Detection Time (Unit: Clocks)
813 (max) 648 (max) 358 (max) 219 (max) 1
Notes
These values indicate the total number of clocks for detecting error bit(s) not including the register read/write time by the CPU.
92CF26A-246
2007-11-21
TMP92CF26A
3.11.4.2 Error Correction Methods Hamming ECC * The ECC generator generates 44 bits of ECC for a page containing 512 bytes of valid data. The error correction process must be performed in units of 256 bytes (22 bits of ECC). The following explains how to implement error correction on 256 bytes of valid data using 22 bits of ECC. If the NAND Flash to be used has a large-capacity page size (e.g. 2048 bytes), the error correction process must be repeated several times to cover the entire page.
*
1) The calculated ECC and the ECC in the redundant area are rearranged, respectively, so that the lower 2 bytes represent line parity (LPR15:0) and the upper 1 byte (of which the upper 6 bits are valid) represents column parity (CPR7:2). 2) The two rearranged ECCs are XORed. 3) If the XOR result is 0 indicating an ECC match, the error correction process ends normally (no error). If the XOR result is other than 0, it is checked whether or not the error data can be corrected. 4) If the XOR result contains only one ON bit, it is determined that a single-bit error exists in the ECC data itself and the error correction process terminates here (error not correctable). 5) If each pair of bits 0 to 21 of the XOR result is either 01B or 10B, it is determined that the error data is correctable and error correction is performed accordingly. If the XOR result contains either 00B or 11B, it is determined that the error data is not correctable and the error correction process terminates here. An Example of Correctable XOR Result
Binary 10 01 10 00 10 10 01 10 01 01 10 10 Column parity Line parity
An Example of Uncorrectable XOR Result
10 11 10 00 10 10 01 10 01 01 10 10 Column parity Line parity
6) The line and bit positions of the error are detected using the line parity and column parity of the XOR result, respectively. The error bit thus detected is then inverted. This completes the error correction process. Example: When the XOR result is 1001101010011001011010 Convert two bytes of line parity into one byte (101, 010). Convert six bits of column parity into three bits (101, 010). Line parity: 10 10 01 10 01 01 10 10 1 1 0 1 0 0 1 1 = D3H Column parity: 10 01 10 1 0 1 =5 *Error in bit 5 *Error at D3/FF H
Based on the above, error correction is performed by inverting the data in bit 5 at address 212.
92CF26A-247
2007-11-21
TMP92CF26A
Reed-Solomon ECC * The ECC generator generates 80 bits of ECC for up to 518 bytes of valid data. If the NAND Flash to be used has a large-capacity page size (e.g. 2048 bytes), the error correction process must be repeated several times to cover the entire page. Basically no calculation is needed for error correction. If error detection is performed properly, the NDFC only needs to refer to the error address and error bit. However, it may be necessary to convert the error address, as explained below.
*
1) If the error address indicated by the NDRSCAn register is in the range of 000H to 007H, this error exists in the ECC area and no correction is needed in this case. (It is not able to correct the error in the ECC area. However, if the error exists in the ECC area, only 4symbol (include the error in the ECC area) can correct the error to this LSI. Please be careful.) 2) If the error address indicated by the NDRSCAn register is in the range of 008H to 20DH, the actual error address is obtained by subtracting this address from 20 DH. (If the valid data is processed as 512 byte, the actual error address is obtained by subtracting this address from 207H when the error address in the range of 008H to 207H.) Example 1: NDRSCAn = 005H, NDRSCDn = 04H = 00000100B As the error address (005H) is in the range of 000H to 007H, no correction is needed. (Although an error exists in bit 2, no correction is needed.) Example 2: NDRSCAn = 083H, NDRSCDn = 81H = 10000001B The actual error address is obtained by subtracting 083H from 20DH. Thus, the error correction process inverts the data in bits 7 and 0 at address 18AH. (If the valid data is 512 byte, the actual error address is obtained by subtracting 083H from 207H. Thus, the error correction process inverts the data in bits 7 and 0 at address 184H.)
Note: If the error address (after converted) is in the range of 000H to 007H, it indicates that an error bit exists in redundant area (ECC). In this case, no error correction is needed. If the number of error bits is not more than 4 symbols, Reed-Solomon codes calculate each error bit precisely even if it is the redundant area (ECC).
92CF26A-248
2007-11-21
TMP92CF26A 3.11.5 Description of Registers
7
NDFMCR0 (08C0H) A read-modify -write operation cannot be performed bit Symbol Read/Write Reset State Function WE 0 WE enable 0: Disable 1: Enable
NAND Flash Control 0 Register 6 5 4 3
ALE 0 ALE control 0: "L" out 1: "H" out CLE R/W 0 CLE control 0: "L" out 1: "H" out CE0 control 0: "H" out 1: "L" out 0 CE1 control 0: "H" out 1: "L" out 0 CE0 CE1
2
ECCE 0 ECC circuit control 0: Disable 1: Enable
1
BUSY R 0 NAND Flash state 1: Busy 0: Ready
0
ECCRST W 0 ECC reset control 0: - 1: Reset *Always read as "0".
15
(08C1H) A read-modifywrite operation cannot be performed bit Symbol Read/Write Reset State Function SPLW1 0
14
SPLW0 0
13
SPHW1 R/W 0
12
SPHW0 0
11
RSECCL 0
10
RSEDN 0
9
RSESTA W 0
8
RSECGW R/W 0
Strobe pulse width (Low width of NDRE ,
Strobe pulse width (High width of NDRE , NDWE ) Inserted width = (fSYS) x (set value)
NDWE ) Inserted width = (fSYS) x (set value)
ReedSolomon ECC latch 0: Disable 1: Enable
ReedSolomon operation 0: Encode (Write) 1: Decode (Read)
ReedSolomon error calculation start 0: - 1: Start *Always read as "0".
ReedSolomon ECC generator write control 0: Disable 1: Enable
Figure3.11.5 NAND Flash Mode Control 0 Register (a) The bit is used for both Hamming and Reed-Solomon codes. When NDFMCR1="0", setting this bit to "1" clears the Hamming ECC in the ECC generator. When NDFMCR1="1", setting this bit to "1" clears the Reed-Solomon ECC. Note that this bit is ineffective when NDFMCR0="0". Before writing to this bit, ensure that NDFMCR0="1". (b) The bit is used for both Hamming and Reed-Solomon codes. This bit is used to check the state of the NAND Flash memory (NDR/B pin). It is set to "1" when the NAND Flash is "busy" and to "0" when it is "ready". Since the NDFC incorporates a noise filter of several states, a change in the NDR/B pin state is reflected on the flag after some delay. It is therefore necessary to inert a delay time by software (e.g. ten NOP instructions) before checking this flag.
Read command Address input Delay time Sensing flag
NDWE pin NDCLE pin NDALE pin NDR/B pin flag
92CF26A-249
2007-11-21
TMP92CF26A
(c) The bit is used for both Hamming and Reed-Solomon codes. This bit is used to enable or disable the ECC generator. To reset the ECC in the ECC generator (to set to "1"), the ECC generator must be enabled ( = "1"). (d) , , The , , and bits are used for both Hamming and Reed-Solomon codes to control the pins of the NAND Flash memory. (e) The bit is used for both Hamming and Reed-Solomon codes to enable or disable write operations. (f)
The bit is used only for Reed-Solomon codes. When Hamming codes are used, this bit should be set to "0". Since valid data and ECC are processed differently, the NDFC needs to know whether valid data or ECC is to be read. This control is implemented by software using this bit. To read valid data from the NAND Flash, set to "0". To read ECC written in the redundant area in the NAND Flash, set to "1".
Note 1: Valid data and ECC cannot be read continuously by DMA transfer. After valid data has been read, DMA transfer should be stopped once to change the bit from "0" to "1" before ECC can be read. Note 2: Immediately after ECC is read from the NAND Flash, the NAND Flash access operation or error bit calculation cannot be performed for a duration of 20 system clocks (fSYS). It is necessary to insert 20 NOP instructions or the like.
(g) The bit is used only for Reed-Solomon codes. The error address and error bit position are calculated using an intermediate code generated from the ECC for written data and the ECC for read data. Setting to "1" starts this calculation. (h) The bit is used only for Reed-Solomon codes. When using Hamming codes, this bit should be set to "0". For a write operation, this bit should be set to "0" (encode) to generate ECC. The ECC read from the NDECCRDn register is written to the redundant area in the NAND Flash. For a read operation, this bit should be set to "1" (decode). In this case, valid data is read from the NAND Flash and the ECC written in the redundant area is also read to generate an intermediate code for calculating the error address and error bit position.
92CF26A-250
2007-11-21
TMP92CF26A
(i)
The bit is used only for Reed-Solomon codes. When using Hamming codes, this bit should be set to "0". The Reed-Solomon processing unit is comprised of two elements: an ECC generator and an ECC calculator. The latter is used to calculate the error address and error bit position. The error address and error bit position are calculated using an intermediate code generated from the ECC for written data and the ECC for read data. At this time, no special care is needed if ECC generation and error calculation are performed serially. If these operations need to be performed parallely, the intermediate code used for error calculation must be latched while the calculation is being performed. The bit is provided to enable this latch operation. When is set to "1", the intermediate code is latched so that the ECC generator can generate the ECC for another page without problem while the ECC calculator is calculating the error address and error bit position. At this time, the ECC generator can perform both encode (write) and decode (read) operations. When is set to "0", the latch is released and the contents of the ECC calculator are updated as the data in the ECC generator is updated.
Reed-Solomon ECC Generator
NDECCRDn Register =1 Latch_ON =0 Latch_OFF
Flow of data F/F 80bit Reed-Solomon ECC Calculator
(j)
The bits are used for both Hamming and Reed-Solomon codes. These bits are used to specify the High width of the NDRE and NDWE signals. The High width to be inserted is obtained by multiplying the value set in these bits by f SYS.
(k) The bits are used for both Hamming and Reed-Solomon codes. These bits are used to specify the Low width of the NDRE and NDWE signals. The Low width to be inserted is obtained by multiplying the value set in these bits by fSYS.
92CF26A-251
2007-11-21
TMP92CF26A
NAND Flash Control 1 Register 7
NDFMCR1 (08C2H) bit Symbol Read/Write Reset State Function
6
5
4
3
2
BUSW 0 Data bus width 0: 8-bit 1: 16-bit
1
ECCS R/W 0 ECC calculation
0
SYSCKE 0 Clock control
INTERDY INTRSC R/W 0 0 Ready interrupt 0: Disable 1: Enable ReedSolomon calculation end interrupt 0: Disable 1: Enable
0:Hamming 0: Disable 1: Enable 1: ReedSolomon
(08C3H) bit Symbol Read/Write Reset State Function
15
STATE3 0
14
STATE2 0
13
STATE1
12
STATE0
11
SEER1
10
SEER0
9
8
R 0 0 Undefined Undefined Status read (See the table below.)
Table3.11.2 Reed-Solomon Calculation Result Status Table STATE<3:0>
0000 0001 0010 0011 0100~1111
Meaning
Calculation ended 0 (No error) Calculation ended 1(5 or more symbols in error; not correctable) Calculation ended 2 (Error found) Calculation in progress
Note: The value becomes effective after the calculation has started.
SEER<1:0>
00 01 10 11
Meaning
1-address error 2-address error 3-address error 4-address error
Note: The value becomes effective after the calculation has ended.
(a) The bit is used for both Hamming and Reed-Solomon codes. When using the NDFC, this bit must be set to "1" to enable the system clock. When not using the NDFC, power consumption can be reduced by setting this bit to "0". (b) The bit is used to select whether to use Hamming codes or Reed-Solomon codes. This bit is set to "0" for using Hamming codes and to "1" for using Reed-Solomon codes. It is also necessary to set this bit for clearing ECC. (c) The bit is used for both Hamming and Reed-Solomon codes. This bit specifies the bus width of the NAND Flash to be accessed ("0" = 8 bits, "1" = 16 bits). No other setting is required in the memory controller.
92CF26A-252
2007-11-21
TMP92CF26A
(d) The bit is used only for Reed-Solomon codes. When using Hamming codes, this bit should be set to "0". This bit is used to enable or disable the interrupt to be generated when the calculation of error address and error bit position has ended. The interrupt is enabled when this bit is set to "1" and disabled when "0". (e) The bit is used for both Hamming and Reed-Solomon codes. This bit is used to enable or disable the interrupt to be generated when the status of the NDR/B pin of the NAND Flash changes from "busy" (0) to "ready" (1). The interrupt is enabled when this bit is set to "1" and disabled when "0". (f)
The and bits are used only for Reed-Solomon codes. When using Hamming codes, they have no meaning. These bits are used as flags to indicate the result of error address and error bit calculation. For details, see Table3.11.2.
92CF26A-253
2007-11-21
TMP92CF26A
NAND Flash Data Register 0 7
NDFDTR0 (1FF0H) bit Symbol Read/Write Reset State Function D7 Undefined
6
D6 Undefined
5
D5
4
D4
3
D3
2
D2
1
D1 Undefined
0
D0 Undefined
R/W Undefined Undefined Undefined Undefined NAND Flash Data Register (7-0)
15
(1FF1H) bit Symbol Read/Write Reset State Function D15 Undefined
14
D14 Undefined
13
D13
12
D12
11
10
9
D9 Undefined
8
D8 Undefined
D11 D10 R/W Undefined Undefined Undefined Undefined NAND Flash Data Register (15-8)
NAND Flash Data Register 1 7
NDFDTR1 (1FF2H) bit Symbol Read/Write Reset State Function D7 Undefined
6
D6 Undefined
5
D5
4
D4
3
2
1
D1 Undefined
0
D0 Undefined
D3 D2 R/W Undefined Undefined Undefined Undefined NAND Flash Data Register (7-0)
15
(1FF3H) bit Symbol Read/Write Reset State Function D15 Undefined
14
D14 Undefined
13
D13
12
D12
11
D11
10
D10
9
D9
8
D8 Undefined
R/W Undefined Undefined Undefined Undefined Undefined NAND Flash Data Register (15-8)
Note: Although these registers allow both read and write operations, no flip-flop is incorporated. Since write and read operations are performed in different manners, it is not possible to read out the data that has been just written.
Figure3.11.6 NAND Flash Data Registers (NDFDTR0, NDFDTR1) Write and read operations to and from the NAND Flash memory are performed by accessing the NDFDTR0 register. When you write to this register, the data is written to the NAND Flash. When you read from this register, the data is read from the NAND Flash. The NDFDTR0 register is used for both channel 0 and channel 1. A total of 4 bytes are provided as data registers to enable 4-byte DMA transfer. For example, 4 bytes of data can be transferred from 32-bit internal RAM to 8-bit NAND Flash memory by DMA operation by setting the destination address as NDFDTR0. (NDFDTR1 cannot be set as the destination address.) The actual DMA operation is performed by first reading 4 bytes from the internal RAM and then writing 1 byte to the NAND Flash four times from the lowest address. To access data in the NAND Flash, be sure to access NDFDTR0 (at address 1FF0). For details, see Table3.11.3.
92CF26A-254
2007-11-21
TMP92CF26A
Table3.11.3 How to Access the NAND Flash Data Register Write Access Data Size
1-byte access 2-byte access 4-byte access
Example of instruction
ld (0x1FF0),a ld (0x1FF0),wa ld (0x1FF0),xwa
8-bit NAND Flash
Supported Supported Supported
16-bit NAND Flash
Not supported Supported Supported
Read Access Data Size
1-byte access 2-byte access 4-byte access
Example of instruction
ld a,(0x1FF0) ld wa,(0x1FF0) ld xwa,(0x1FF0)
8-bit NAND Flash
Supported Supported Supported
16-bit NAND Flash
Not supported Supported Supported
92CF26A-255
2007-11-21
TMP92CF26A
NAND Flash ECC Register 0 7
NDECCRD0 (08C4H) bit Symbol Read/Write Reset State Function ECCD7 0
6
ECCD6 0
5
ECCD5 0
4
ECCD4
3
ECCD3
2
ECCD2
1
ECCD1 0
0
ECCD0 0
R 0 0 0 NAND Flash ECC Register (7-0)
15
(08C5H) bit Symbol Read/Write Reset State Function ECCD15 0
14
ECCD14 0
13
ECCD13 0
12
ECCD12 R
11
ECCD11
10
ECCD10
9
ECCD9 0
8
ECCD8 0
0 0 0 NAND Flash ECC Register (15-8)
NAND Flash ECC Register 1 7
NDECCRD1 (08C6H) bit Symbol Read/Write Reset State Function ECCD7 0
6
ECCD6 0
5
ECCD5 0
4
ECCD4 R
3
ECCD3
2
ECCD2
1
ECCD1 0
0
ECCD0 0
0 0 0 NAND Flash ECC Register (7-0)
15
(08C7H) bit Symbol Read/Write Reset State Function ECCD15 0
14
ECCD14 0
13
ECCD13 0
12
ECCD12
11
ECCD11
10
ECCD10
9
ECCD9 0
8
ECCD8 0
R 0 0 0 NAND Flash ECC Register (15-8)
NAND Flash ECC Register 2 7
NDECCRD2 bit Symbol (08C8H) Read/Write Reset State Function ECCD7 0
6
ECCD6 0
5
ECCD5 0
4
ECCD4 R
3
ECCD3
2
ECCD2
1
ECCD1 0
0
ECCD0 0
0 0 0 NAND Flash ECC Register (7-0)
15
(08C9H) bit Symbol Read/Write Reset State Function ECCD15 0
14
ECCD14 0
13
ECCD13 0
12
ECCD12
11
ECCD11
10
ECCD10
9
ECCD9 0
8
ECCD8 0
R 0 0 0 NAND Flash ECC Register (15-8)
NAND Flash ECC Register 3 7
NDECCRD3 bit Symbol (08CAH) Read/Write Reset State Function ECCD7 0
6
ECCD6 0
5
ECCD5 0
4
ECCD4 R
3
ECCD3
2
ECCD2
1
ECCD1 0
0
ECCD0 0
0 0 0 NAND Flash ECC Register (7-0)
15
(08CBH) bit Symbol Read/Write Reset State Function ECCD15 0
14
ECCD14 0
13
ECCD13 0
12
ECCD12 R
11
ECCD11
10
ECCD10
9
ECCD9 0
8
ECCD8 0
0 0 0 NAND Flash ECC Register (15-8)
92CF26A-256
2007-11-21
TMP92CF26A
NAND Flash ECC Register 4 7
NDECCRD4 (08CCH) bit Symbol Read/Write Reset State Function ECCD7 0
6
ECCD6 0
5
ECCD5 0
4
ECCD4 R
3
ECCD3
2
ECCD2
1
ECCD1 0
0
ECCD0 0
0 0 0 NAND Flash ECC Register (7-0)
15
(08CDH) bit Symbol Read/Write Reset State Function ECCD15 0
14
ECCD14 0
13
ECCD13 0
12
ECCD12
11
ECCD11
10
ECCD10
9
ECCD9 0
8
ECCD8 0
R 0 0 0 NAND Flash ECC Register (15-8)
Figure3.11.7 NAND Flash ECC Registers The NAND Flash ECC register is used to read ECC generated by the ECC generator. After valid data has been written to or read from the NAND Flash, setting NDFMCR0 to "0" causes the corresponding ECC to be set in this register. (The ECC in this register is updated when NDFMCR0 changes from "1" to "0".) When Hamming codes are used, 22 bits of ECC are generated for up to 256 bytes of valid data. In the case of Reed-Solomon codes, 80 bits of ECC are generated for up to 518 bytes of valid data. A total of 80 bits of registers are provided, arranged as five 16-bit registers. These registers must be read in 16-bit units and cannot be accessed in 32-bit units. After ECC calculation has completed, in the case of Hamming codes, the 16-bit line parity for the first 256 bytes is stored in the NDECCRD0 register, the 6-bit column parity for the first 256 bytes in the NDECCRD1 register (), the 16-bit line parity for the second 256 bytes in the NDECCRD2 register, and the 6-bit column parity for the second 256 bytes in the NDECCRD3 register (). In this case, the NDECCRD4 register is not used. In the case of Reed-Solomon codes, 80 bits of ECC are stored in the NDECCRD0, NDECCRD1, NDECCRD2, NDECCRD3 and NDECCRD4 registers.
Note: Before reading ECC from the NAND Flash ECC register, be sure to set NDFMCR0 to "0". The ECC in the NAND Flash ECC register is updated when NDFMCR0 changes from "1" to "0". Also note that when the ECC in the ECC generator is reset by NDFMCR0, the contents of this register are not reset.
Register Name
NDECCRD0 NDECCRD1 NDECCRD2 NDECCRD3 NDECCRD4
Hamming
[15:0] Line parity (for the first 256 bytes) [7:2] Column parity (for the first 256 bytes) [15:0] Line parity (for the second 256 bytes) [7:2] Column parity (for the second 256 bytes) Not in use
Reed-Solomon
[15:0] Reed-Solomon ECC code 79:64 [15:0] Reed-Solomon ECC code 63:48 [15:0] Reed-Solomon ECC code 47:32 [15:0] Reed-Solomon ECC code 31:16 [15:0] Reed-Solomon ECC code 15:0
92CF26A-257
2007-11-21
TMP92CF26A
The table below shows an example of how ECC is written to the redundant area in the NAND Flash memory when using Reed-Solomon codes. When using Hamming codes with SmartMediaTM, the addresses of the redundant area are specified by the physical format of SmartMediaTM. For details, refer to the SmartMediaTM Physical Format Specifications. Register Name
NDECCRD0 NDECCRD1 NDECCRD2 NDECCRD3 NDECCRD4
Reed-Solomon
[15:0] Reed-Solomon ECC code 79:64 [15:0] Reed-Solomon ECC code 63:48 [15:0] Reed-Solomon ECC code 47:32 [15:0] Reed-Solomon ECC code 31:16 [15:0] Reed-Solomon ECC code 15:0
NAND Flash Address
Upper 8 bits [79:72] address 518 Lower 8 bits [71:64] address 519 Upper 8 bits [63:56] address 520 Upper 8 bits [55:48] address 521 Upper 8 bits [47:40] address 522 Lower 8 bits [39:32] address 523 Upper 8 bits [31:24] address 524 Lower 8 bits [23:16] address 525 Upper 8 bits [15:8] address 526 Lower 8 bits [7:0] address 527
92CF26A-258
2007-11-21
TMP92CF26A
NAND Flash Reed-Solomon Calculation Result Address Register 7 6 5 4 3 2
NDRSCA0 bit Symbol (08D0H) Read/Write Reset State Function (08D1H) bit Symbol Read/Write Reset State Function RS0A7 0 RS0A6 RS0A5 RS0A4 RS0A3 RS0A2
1
RS0A1
0
RS0A0 0
R 0 0 0 0 0 0 NAND Flash Reed-Solomon Calculation Result Address Register (7-0)
15
14
13
12
11
10
9
RS0A9
8
RS0A8
R 0 0 NAND Flash Reed-Solomon Calculation Result Address Register (9-8)
7
NDRSCA1 bit Symbol (08D4H) Read/Write Reset State Function (08D5H) bit Symbol Read/Write Reset State Function RS1A7 0
6
RS1A6
5
RS1A5
4
RS1A4 R
3
RS1A3
2
RS1A2
1
RS1A1
0
RS1A0 0
0 0 0 0 0 0 NAND Flash Reed-Solomon Calculation Result Address Register (7-0)
15
14
13
12
11
10
9
RS1A9 R
8
RS1A8
0 0 NAND Flash ReedSolomon Calculation Result Address Register (9-8)
7
NDRSCA2 bit Symbol (08D8H) Read/Write Reset State Function (08D9H) bit Symbol Read/Write Reset State Function RS2A7 0
6
RS2A6
5
RS2A5
4
RS2A4
3
RS2A3
2
RS2A2
1
RS2A1
0
RS2A0 0
R 0 0 0 0 0 0 NAND Flash Reed-Solomon Calculation Result Address Register (7-0)
15
14
13
12
11
10
9
RS2A9
8
RS2A8
R 0 0 NAND Flash ReedSolomon Calculation Result Address Register (9-8)
7
NDRSCA3 bit Symbol (08DCH) Read/Write Reset State Function (08DDH) bit Symbol Read/Write Reset State Function RS3A7 0
6
RS3A6
5
RS3A5
4
RS3A4
3
RS3A3
2
RS3A2
1
RS3A1
0
RS3A0 0
R 0 0 0 0 0 0 NAND Flash Reed-Solomon Calculation Result Address Register (7-0)
15
14
13
12
11
10
9
RS3A9
8
RS3A8
R 0 0 NAND Flash ReedSolomon Calculation Result Address Register (9-8)
Figure3.11.8 NAND Flash Reed-Solomon Calculation Result Address Register
92CF26A-259
2007-11-21
TMP92CF26A
If error is found at only one address, the error address is stored in the NDRSCA0 register. If error is found at two addresses, the NDRSCA0 and NDRSCA1 registers are used to store the error addresses. In this manner, up to four error addresses can be stored in the NDRSCA0 to NDRSCA3 registers. The number of error addresses can be checked by NDFMCR1.
NAND Flash Reed-Solomon Calculation Result Data Register 7
NDRSCD0 (08D2H) bit Symbol Read/Write Reset State Function RS0D7 0
6
RS0D6
5
RS0D5
4
RS0D4
3
RS0D3
2
RS0D2
1
RS0D1
0
RS0D0 0
R 0 0 0 0 0 0 NAND Flash Reed-Solomon Calculation Result Data Register (7-0)
7
NDRSCD1 (08D6H) bit Symbol Read/Write Reset State Function RS1D7 0
6
RS1D6
5
RS1D5
4
RS1D4 R
3
RS1D3
2
RS1D2
1
RS1D1
0
RS1D0 0
0 0 0 0 0 0 NAND Flash Reed-Solomon Calculation Result Data Register (7-0)
7
NDRSCD2 (08DAH) bit Symbol Read/Write Reset State Function RS2D7 0
6
RS2D6
5
RS2D5
4
RS2D4 R
3
RS2D3
2
RS2D2
1
RS2D1
0
RS2D0 0
0 0 0 0 0 0 NAND Flash Reed-Solomon Calculation Result Data Register (7-0)
7
NDRSCD3 (08DEH) bit Symbol Read/Write Reset State Function RS3D7 0
6
RS3D6
5
RS3D5
4
RS3D4
3
RS3D3
2
RS3D2
1
RS3D1
0
RS3D0 0
R 0 0 0 0 0 0 NAND Flash Reed-Solomon Calculation Result Data Register (7-0)
Figure3.11.9 NAND Flash Reed-Solomon Calculation Result Data Register If error is found at only one address, the error data is stored in the NDRSCD0 register. If error is found at two addresses, the NDRSCD0 and NDRSCD1 registers are used to store the error data. In this manner, the error data at up to four addresses can be stored in the NDRSCD0 to NDRSCD3 registers. The number of error addresses can be checked by NDFMCR1.
92CF26A-260
2007-11-21
TMP92CF26A 3.11.6 An Example of Accessing NAND Flash of SLC Type
1. Initialization ; ; ***** Initialize NDFC ***** ; Conditions: 8-bit bus, CE0, SLC, 512 (528) bytes/page, Hamming codes ; ld ld 2. Write Writing valid data ; ***** Write valid data***** ; ldw ldw ld ldw ld ldw ld (ndfmcr0),2010h ; CE0 enable (ndfmcr0),20B0h ; WE enable, CLE enable (ndfdtr0),80h ; Serial input command (ndfmcr0),20D0h ; ALE enable (ndfdtr0),xxh ; Address write (3 or 4 times) (ndfmcr0),2095h ; Reset ECC, ECCE enable, CE0 enable (ndfdtr0),xxh ; Data write (512 times) (ndfmcr1),0001h ; 8-bit bus, Hamming ECC, SYSCK-ON (ndfmcr0),2000h ; SPLW1:0=0, SPHW1:0=2
Generating ECC Reading ECC ; ***** Read ECC ***** ; ldw ldw ; ldw ; ldw ; ldw ; (ndfmcr0),2010h ; ECC circuit disable xxxx,(ndeccrd0) 1'st Read: xxxx,(ndeccrd1) 2'nd Read: xxxx,(ndeccrd0) 3'rd Read: xxxx,(ndeccrd1) 4'th Read: ; Read ECC from internal circuit D15-0 > LPR15:0 For first 256 bytes ; Read ECC from internal circuit D15-0 > FFh+CPR5:0+11b For first 256 bytes ; Read ECC from internal circuit D15-0 > LPR15:0 For second 256 bytes ; Read ECC from internal circuit D15-0 > FFh+CPR5:0+11b For second 256 bytes
Writing ECC to NAND Flash ; ***** Write dummy data & ECC***** ; ldw (ndfmcr0),2090h ; ECC circuit disable, data write mode ld ; ; ; ; ; ; (ndfdtr0),xxh Write to D520: Write to D521: Write to D522: Write to D525: Write to D526: Write to D527: ; Redundancy area data write (16 times) LPR7:0 LPR15:8 CPR5:0+11b LPR7:0 LPR15:8 CPR5:0+11b > D7-0 > D7-0 > D7-0 > D7-0 > D7-0 > D7-0 For second 256 bytes For second 256 bytes For second 256 bytes For first 256 bytes For first 256 bytes For first 256 bytes
92CF26A-261
2007-11-21
TMP92CF26A
Executing page program ; ***** Set auto page program***** ; ldw ld ldw ; ; ; ; ; (ndfmcr0),20B0h ; WE enable, CLE enable (ndfdtr0),10h ; Auto page program command (ndfmcr0),2010h ; WE disable, CLE disable
Wait setup time (from Busy to Ready) 1. Flag polling 2. Interrupt
Reading status ; ***** Read Status***** ; ldw ld ldw ld (ndfmcr0),20B0h ; WE enable, CLE enable (ndfdtr0),70h ; Status read command (ndfmcr0),2010h ; WE disable, CLE disable xx,(ndfdtr0) ; Status read
92CF26A-262
2007-11-21
TMP92CF26A
3. Read Reading valid data ; ***** Read valid data***** ; ldw (ndfmcr0),2010h ; CE0 enable ldw ld ldw ld ; ; ; ; ; ldw ld ldw ld ld ld ld (ndfmcr0),20B0h ; WE enable, CLE enable (ndfdtr0),00h ; Read command (ndfmcr0),20D0h ; ALE enable (ndfdtr0),xxh ; Address write (3 or 4 times)
Wait setup time (from Busy to Ready) 1. Flag polling 2. Interrupt (ndfmcr0),2015h ; Reset ECC, ECCE enable, CE0 enable xx,(ndfdtr0) ; Data read (512 times) (ndfmcr0),2010h ; ECC circuit disable xx,(ndfdtr0) ; Redundancy data read (8 times) xx,(ndfdtr0) xx,(ndfdtr0) xx,(ndfdtr0) ; ECC data read (3 times) ; Redundancy data read (2 times) ; ECC data read (3 times)
Generating ECC Reading ECC ; ***** Read ECC ***** ; ldw ldw ; ldw ; ldw ; ldw ; (ndfmcr0),2010h ; ECC circuit disable xxxx,(ndeccrd0) ; Read ECC from internal circuit 1'st Read: xxxx,(ndeccrd1) 2'nd Read: xxxx,(ndeccrd0) 3'rd Read: xxxx,(ndeccrd1) 4'th Read: D15-0 > LPR15:0 For first 256 bytes ; Read ECC from internal circuit D15-0 > FFh+CPR5:0+11b For first 256 bytes ; Read ECC from internal circuit D15-0 > LPR15:0 For second 256 bytes ; Read ECC from internal circuit D15-0 > FFh+CPR5:0+11b For second 256 bytes
Software processing The ECC data generated for the read operation and the ECC in the redundant area in the NAND Flash are compared. If any error is found, the error processing routine is performed to correct the error data. For details, see 3.11.4.2 "Error Correction Methods".
92CF26A-263
2007-11-21
TMP92CF26A
4. ID Read The ID read routine is as follows: ldw ld ldw ld ldw ld ld (ndfmcr0),20B0h ; WE Enable, CLE enable (ndfdtr0),90h ; Write ID read command (ndfmcr0),20D0h ; ALE enable, CLE disable (ndfdtr0),00h ; Write 00 (ndfmcr0),2010h ; WE disable, CLE disable xx,(ndfdtr0) ; Read 1'st ID maker code xx,(ndfdtr0) ; Read 2'nd ID device code
92CF26A-264
2007-11-21
TMP92CF26A 3.11.7 An Example of Accessing NAND Flash of MLC Type (When the valid data is processed as 518byte)
1. Initialization ; ; ***** Initialize NDFC ***** ; ; Conditions: 16-bit bus, CE1, MLC, 2048 (2112) bytes/page, Reed-Solomon codes ld ld 2. Write Writing valid data ; ***** Write valid data***** ; ldw ldw ldw ldw ldw ldw ldw (ndfmcr0),5008h ; CE1 enable (ndfmcr0),50A8h ; WE enable, CLE enable (ndfdtr0),0080h ; serial input command (ndfmcr0),50C8h ; ALE enable (ndfdtr0),00xxh ; Address write ( 4 or 5 times) (ndfmcr0),508Dh ; Reset ECC code, ECCE enable (ndfdtr0),xxxxh ; Data write (259-times/:518byte) (256-times/512byte) (ndfmcr1),0007h ; 16-bit bus, Reed-Solomon ECC, SYSCK-ON (ndfmcr0),5000h ; SPLW1:0=1, SPHW1:0=1
Generating ECC Reading ECC ; ***** Read ECC ***** ; ldw (ndfmcr0),5008h ; ECC circuit disable ldw ldw ldw ldw ldw ; ldw ; ldw ; ldw ; ldw ; (ndfmcr0),50A8h ; WE enable, CLE enable (ndfdtr0),0080h ; serial input command (ndfmcr0),50C8h ; ALE enable (ndfdtr0),00xxh xxxx,(ndeccrd0) ; Address write ( 4 or 5 times) ; Read ECC from internal circuit
Read: D79-64 xxxx,(ndeccrd1) ; Read ECC from internal circuit Read: D63-48 ; Read ECC from internal circuit xxxx,(ndeccrd2)
Read: D47-32 xxxx,(ndeccrd3) ; Read ECC from internal circuit Read: D31-16 xxxx,(ndeccrd4) ; Read ECC from internal circuit Read: D15-0
92CF26A-265
2007-11-21
TMP92CF26A
Writing ECC to NAND Flash ; ***** Write dummy data & ECC ***** ; ldw (ndfmcr0),5088h ; ECC circuit disable, data write mode ldw ; ldw ; ldw ; ldw ; ldw ; ; ; The write operation is repeated four times to write 2112 bytes. (ndfdtr0),xxxxh ; Redundancy area data write Write to 207-206hex address: > D79-64 (ndfdtr1),xxxxh ; Redundancy area data write Write to 209-208hex address: > D63-48 (ndfdtr0),xxxxh ; Redundancy area data write Write to 20B-20Ahex address: (ndfdtr1),xxxxh > D47-32 ; Redundancy area data write
Write to 20D-20Chex address: > D31-16 (ndfdtr0),xxxxh ; Redundancy area data write Write to 20F-20Ehex address: > D15-0
Executing page program ; ***** Set auto page program***** ; ldw ldw ldw ; ; ; ; (ndfmcr0),50A8h ; WE enable, CLE enable (ndfdtr0),0010h ; Auto page program command (ndfmcr0),5008h ; WE disable, CLE disable
Wait set up time (from Busy to Ready) 1. Flag polling 2. Interrupt
Note: In case of LB type NANDF, programming page size is normally each 2112 bytes and ECC calculation is processed each 518 (512) bytes. Please take care of programming flow. In details, refer the NANDF memory specifications.
Reading status ; ***** Read status***** ; ldw (ndfmcr0),50A8h ; WE enable, CLE enable ldw ldw ldw (ndfdtr0),0070h ; Status read command (ndfmcr0),5008h ; WE disable, CLE disable xxxx,(ndfdtr0) ; Status read
92CF26A-266
2007-11-21
TMP92CF26A
3. Read (including ECC data read) Reading valid data ; ***** Read valid data***** ; ldw ldw ldw ldw ldw ldw ldw ; ; ; ; ; ldw ldw ldw ldw ; ; ; (1) Error bit calculation ldw (ndfmcr1),0047h ; Error bit calculation interrupt enable ldw ; ; ; ; INT: ; ; ; ; ; ; ; The read operation is repeated four times to read 2112 bytes. (ndfmcr0),560Ch ; Error bit calculation circuit start (ndfmcr0),5008h ; CE1 enable (ndfmcr0),50A8h ; WE enable, CLE enable (ndfdtr0),0000h ; Read command 1 (ndfmcr0),50C8h ; ALE enable (ndfdtr0),00xxh ; Address write (4 or 5 times) (ndfmcr0),50A8h ; WE enable, CLE enable (ndfdtr0),0030h ; Read command 2
Wait set up time (from Busy to Ready) 1. Flag polling 2. Interrupt (ndfmcr0),540Dh ; ECC reset, ECC circuit enable, decode mode xxxx,(ndfdtr0) ; Data read (259 times: 518 bytes) (256-times:512 byte) (ndfmcr0),550Ch ; RSECGW enable ; Read ECC (5 times: 80 bits)
xxxx,(ndfdtr0)
Wait set up time (20 system clocks)
Wait set up time Interrupt routine (End of calculation for Reed-Solomon Error bit) ldw xxxx,(ndfmcr1) ; Check error status "STATE3:0, SEER1:0"
If error is found, the error processing routine is performed to correct the error data. For details see 3.11.4.2 "Error Correction Methods".
92CF26A-267
2007-11-21
TMP92CF26A
4. ID Read The ID read routine is as follows: ldw ldw ldw ldw ldw ldw ldw (ndfmcr0),50A8h ; WE enable, CLE enable (ndfdtr0),0090h ; Write ID read command (ndfmcr0),50C8h ; ALE enable, CLE disable (ndfdtr0),0000h ; Write 00 (ndfmcr0),5008h ; WE disable, CLE disable xxxx,(ndfdtr0) ; Read 1'st ID maker code xxxx,(ndfdtr1) ; Read 2'ndID device code
92CF26A-268
2007-11-21
TMP92CF26A 3.11.8 An Example of Connections with NAND Flash
TMP92CF26A
100K NDCLE NDALE NDRE NDWE
NAND-Flash-0 CLE ALE RE WE
NAND-Flash-1 CLE ALE RE WE
2K NDR/B D[15:0] R/B (open drain) I/O[15:0] CE
ND0CE
R/B (open drain) I/O[7:0]
WP
CE
WP
ND1CE External circuits for Write-protect
Note 1: A reset sets the NDRE and NDWE pins as input ports, so pull-up resistors are needed. Note 2: The pull-up resistor value for the NDR/B pin must be set appropriately according to the NAND Flash memory to be used and the capacity of the board (typical: 2 K). Note 3: The WP (Write Protect) pin of NAND Flash is not supported. When this function is needed, prepare it on an external circuit.
Figure3.11.10 An Example of Connections with NAND Flash
92CF26A-269
2007-11-21
TMP92CF26A
3.12 8 Bit Timer (TMRA)
The TMP92CF26A features 8 channel built-in 8-bit timers (TMRA0 to TMRA7). These timers are paired into 4 modules: TMRA01, TMRA23, TMRA45 and TMRA67. Each module consists of 2 channels and can operate in any of the following 4 operating modes. * * * * 8-bit interval timer mode 16-bit interval timer mode 8-bit programmable square wave pulse generation output mode (PPG: Variable duty cycle with variable period) 8-bit pulse width modulation output mode (PWM - Variable duty cycle with constant period) Figure 3.12.1 to Figure 3.12.4 show block diagrams for TMRA01 to TMRA67. Each channel consists of an 8-bit up counter, an 8-bit comparator and an 8-bit timer register. In addition, a timer flip-flop and a prescaler are provided for each pair of channels. The operation mode and timer flip-flops are controlled by a 5bytes registers SFRs (Special-function registers). Each of the 4 modules (TMRA01 to TMRA67) can be operated independently. All modules operate in the same manner; hence only the operation of TMRA01 is explained here. The contents of this chapter are as follows.
Table 3.12.1 Registers and Pins for Each Module Module Specification
Input pin for external External pin clock Output pin for timer flip-flop Timer run register SFR (Address) Timer register Timer mode register Timer flip-flop control register
TMRA01
TA0IN (Shared with PC1) TA1OUT (Shared with PM1) TA01RUN (1100H) TA0REG (1102H) TA1REG (1103H) TA01MOD (1104H) TA1FFCR (1105H)
TMRA23
TA2IN (Shared with PC3) TA3OUT (Shared with PP1) TA23RUN (1108H) TA2REG (110AH) TA3REG (110BH) TA23MOD (110CH) TA3FFCR (110DH)
TMRA45
Low-frequency clock fs TA5OUT (Shared with PP2) TA45RUN (1110H) TA4REG (1112H) TA5REG (1113H) TA45MOD (1114H) TA5FFCR (1115H)
TMRA67
Low-frequency clock fs TA7OUT (Shared with PP3) TA67RUN (1118H) TA6REG (111AH) TA7REG (111BH) TA67MOD (111CH) TA7FFCR (111DH)
92CF26A-270
2007-11-21
3.12.1
Prescaler 16 32 64 128 256 512 T16 Timer flip-flop TA1FF TA01RUN Selector TA1FFCR 8-bit up counter (UC1) 8-bit up counter (UC0) 2 Over flow TA01MOD TA01MOD
n
Prescaler clock T0TMR TA01RUN T256
2
4
8
Run/clear
T1
T4
Block Diagram
Timer flip-flop output: TA1OUT
TA01RUN
External input clock: TA0IN T1 T16 T256
Selector
T1 T4 T16
Figure 3.12.1 TMRA01 Block Diagram
92CF26A-271
8-bit up counter (CP0) TA01MOD 8-bit timer register TA0REG 8-bit timer register TA1REG Match detect
TA0TRG
TA01MOD
8-bit comparator (CP1)
Match detect
TA01RUN
Register buffer 0
TMP92CF26A
2007-11-21
Internaldata bus
TMRA0 Interrupt output: INTTA0
TMRA0 Internal data bus Interrupt output: TA0TRG
TMRA1 Interrupt output: INTTA1
Prescaler 16 32 64 128 256 512 T16 Timer flip-flop TA3FF TA23RUN Selector TA3FFCR 8-bit up counter (UC2) 2 Over flow TA23MOD TA23MOD
n
Prescaler clock T0TMR TA23RUN T256
2
4
8
Run/clear
T1
T4
Timer flip-flop output: TA3OUT
TA23RUN
Selector T1 T16 T256 8-bit up comparator (UC3)
External input clock: TA2IN
T1 T4 T16
Figure 3.12.2 TMRA23 Block Diagram
92CF26A-272
8-bit comparator (CP2) TA23MOD 8-bit timer register TA2REG 8-bit timer register TA3REG Match detect
TA2TRG
TA23MOD
8-bit comparator (CP3)
Match detect
TA23RUN
Register buffer 2
TMP92CF26A
2007-11-21
Internal data bus
TMRA2 Interrupt output: INTTA2
TMRA2 Internal data bus Interrupt output: TA2TRG
TMRA3 Interrupt output: INTTA3
Prescaler 8 T16 Timer flip-flop TA5FF TA45RUN Selector TA5FFCR 8-bit up counter (UC4) 2 Over flow TA45MOD TA45MOD
n
Prescaler clock T0TMR 16 32 64 128 256 512 T256 TA45RUN
2
4
Run/clear
T1
T4
Timer flip-flop output: TA5OUT
TA45RUN
Lowfrequency clock (fs) T1 T16 T256 8-bit up comparator (UC5)
Selector
T1 T4 T16
Figure 3.12.3 TMRA45 Block Diagram
92CF26A-273
8-bit comparator (CP4) TA45MOD 8-bit timer register TA4REG Match detect
TA4TRG
TA45MOD
8-bit comparator (CP5)
Match detect
8-bit timer register TA5REG
TA45RUN
Register buffer 4
TMP92CF26A
2007-11-21
Internal data bus
TMRA4 Interrupt output: INTTA4
TMRA4 Internal data bus Interrupt output: TA4TRG
TMRA5 Interrupt output: INTTA5
Prescaler 16 32 64 128 256 512 T16 Timer flip-flop TA7FF TA67RUN Selector TA7FFCR 8-bit up counter (UC6) 2 Over flow TA67MOD TA67MOD
n
Prescaler clock T0TMR TA67RUN T256
2
4
8
Run/clear
T1
T4
Timer flip-flop output: TA7OUT
TA67RUN
Lowfrequency clock (fs) T1 T16 T256 8-bit up comparator (UC7)
Selector
T1 T4 T16
Figure 3.12.4 TMRA67 Block Diagram
92CF26A-274
8-bit comparator (CP6) TA67MOD 8-bit timer register TA6REG 8-bit timer register TA7REG Match detect
TA6TRG
TA67MOD
8-bit comparator (CP7)
Match detect
TA67RUN
Register buffer 6
TMP92CF26A
2007-11-21
Internal data bus
TMRA6 Interrupt output: INTTA6
TMRA6 Internal data bus Interrupt output: TA6TRG
TMRA7 Interrupt output: INTTA7
TMP92CF26A 3.12.2 Operation of Each Circuit
(1) Prescaler A 9-bit prescaler generates the input clock to TMRA01.The clock T0TMR is selected using the prescaler clock selection register SYSCR0. The prescaler operation can be controlled using TA01RUN in the timer control register. Setting to "1" starts the count; setting to "0" clears the prescaler to "0" and stops operation. Table 3.12.2 shows the various prescaler output clock resolutions. (Although the prescaler and the timer counter can be started separately, the timer counter's operation depends on the prescaler's input timing.) Table 3.12.2 Prescaler Output Clock Resolution
Clock gear selection SYSCR1 000(1/1) 001(1/2) 010(1/4) 011(1/8) fc 100(1/16) 000(1/1) 001(1/2) 010(1/4) 011(1/8) 100(1/16) 1(1/8) 1/2 0(1/2) Prescaler of clock gear SYSCR0 - T1(1/2) fc/8 fc/16 fc/32 fc/64 fc/128 fc/32 fc/64 fc/128 fc/256 fc/512 Timer counter input clock Prescaler of TMRA TAxxMOD T4(1/8) fc/32 fc/64 fc/128 fc/256 fc/512 fc/128 fc/256 fc/512 fc/1024 fc/2048 T16(1/32) fc/128 fc/256 fc/512 fc/1024 fc/2048 fc/512 fc/1024 fc/2048 fc/4096 fc/8192 T256(1/512) fc/2048 fc/4096 fc/8192 fc/16384 fc/32768 fc/8192 fc/16384 fc/32768 fc/65536 fc/131072
(2)
Up counters (UC0 and UC1) These are 8-bit binary counters which count up the input clock pulses for the clock specified by TA01MOD. The input clock for UC0 is selectable and can be either the external clock input via the TA0IN pin or one of the three internal clocks T1, T4 or T16. The clock setting is specified by the value set in TA01MOD. The input clock for UC1 depends on the operation mode. In 16-bit timer mode, the overflow output from UC0 is used as the input clock. In any mode other than 16-bit timer mode, the input clock is selectable and can either be one of the internal clocks T1, T16 or T256, or the comparator output (The match detection signal) from TMRA0. For each interval timer the timer operation control register bits TA01RUN and TA01RUN can be used to stop and clear the up counters and to control their count. A reset clears both up counters, stopping the timers.
Note: TMR45 and TMR67 can be selected low-frequency clock(fs) instead of external clock input.
92CF26A-275
2007-11-21
TMP92CF26A
(3) Timer registers (TA0REG and TA1REG) These are 8-bit registers, which can be used to set a time interval. When the value set in the timer register TA0REG or TA1REG matches the value in the corresponding up counter, the comparator match detect signal goes active. If the value set in the timer register is 00H, the signal goes active when the up counter overflows. TA0REG has a double buffer structure, making a pair with the register buffer. The setting of the bit TA01RUN determines whether TA0REG's double buffer structure is enabled or disabled. It is disabled if = "0" and enabled if = "1". When the double buffer is enabled, data is transferred from the register buffer to the timer register when a 2n overflow occurs in PWM mode, or at the start of the PPG cycle in PPG mode. Hence the double buffer cannot be used in timer mode. (When using the double buffer, method of renewing timer register is only overflow in PWM mode or frequency agreement in PPG mode.) A reset initializes to "0", disabling the double buffer. To use the double buffer, write data to the timer register, set to "1", and write the following data to the register buffer. Figure 3.12.5 shows the configuration of TA0REG.
Timer registers 0 (TA0REG) B Shift trigger Register buffer 0 Write Internal data bus TA01RUN Selector S A Write to TA0REG Matching detection PPG cycle n 2 overflow of PWM
Figure 3.12.5 Configuration of timer register (TA0REG)
Note: The same memory address is allocated to the timer register and the register buffer 0. When = "0", the same value is written to the register buffer 0 and the timer register; when = "1", only the register buffer 0 is written to.
92CF26A-276
2007-11-21
TMP92CF26A
(4) Comparator (CP0, CP1) The comparator compares the value in an up counter with the value set in a timer register. If they match, the up counter is cleared to "0" and an interrupt signal (INTTA0 or INTTA1) is generated. If timer flip-flop inversion is enabled, the timer flip-flop is inverted at the same time.
Note: If a value smaller than the up-counter value is written to the timer register while the timer is counting up, this will cause the timer to overflow and an interrupt cannot be generated at the expected time. (The value in the timer register canbe changed without any problem if the new value is larger than the up-counter value.) In 16-bit interval timer mode, be sure to write to both TA0REG and TA1REG in this order (16 bits in total), The compare circuit will not function if only the lower 8 bits are set.
(5)
Timer flip-flop (TA1FF) The timer flip-flop (TA1FF) is a flip-flop inverted by the match detect signals (8-bit comparator output) of each interval timer. Whether inversion is enabled or disabled is determined by the setting of the bit TA1FFCR in the timer flip-flops control register. A reset clears the value of TA1FF to "0". Writing "01" or "10" to TA1FFCR sets TA1FF to "0" or "1". Writing "00" to these bits inverts the value of TA1FF. (This is known as software inversion.) The TA1FF signal is output via the TA1OUT pin. When this pin is used as the timer output, the timer flip-flop should be set beforehand using the port function registers. The condition for TA1FF inversion varies with mode as shown below
8-bit interval timer mode 16-bit interval timer mode 80bit PWM mode 8-bit PPG mode
: UC0 matches TA0REG or UC1 matches TA1REG (Select either one of the two) : UC0 matches TA0REG or UC1 matches TA1REG n : UC0 matches TA0REG or a 2 overflow occurs : UC0 matches TA0REG or UC0 matches TA1REG
Note: If an inversion by the match-detect signal and a setting change via the TMRA1 flip-flopcontrol register occur simultaneously, the resultant operation varies depending on the situation, as shown below. * If an inversion by the match-detect signal and an inversion via the register occur simultaneously, the flip-flop will be inverted only once. * If an inversion by the match-detect signal and an attempt to set the flip-flop to 1 via the register occur simultaneously, the timer flip-flop will be set to 1. * If an inversion by the match-detect signal and an attempt to clear the flip-flop to 0 via the register occur simultaneously the flip-flop will be cleared to 1.
Be sure to stop the timer before changing the flip-flop incersion setting. If the setting is chaged while the timer is counting, proper operation cannot be obtained.
92CF26A-277
2007-11-21
TMP92CF26A 3.12.3 SFR
TMRA01 RUN Register 7
TA01RUN (1100H) Bit symbol Read/Write Reset State Function TA0RDE R/W 0 Double buffer 0: Disable 1: Enable TA0REG double buffer control 0 Disable 1 Enable 0 In IDLE2 mode 0: Stop 1: Operate 0 TMRA01 prescaler
6
5
4
3
I2TA01
2
TA01PRUN R/W
1
TA1RUN 0 Up counter (UC1)
0
TA0RUN 0 Up counter (UC0)
0: Stop and clear 1: Run (Count up) Count control 0 Stop and clear 1 Run (Count up)
Note: The values of bits 4 to 6 of TA01RUN are "1" when read.
TMRA23 RUN Register 7
TA23RUN Bit symbol (1108H) Read/Write Reset State Function TA2RDE R/W 0 Double buffer 0: Disable 1: Enable TA3REG double buffer control 0 Disable 1 Enable 0 In IDLE2 mode 0: Stop 1: Operate 0 TMRA23 prescaler
6
5
4
3
I2TA23
2
TA23PRUN R/W
1
TA3RUN 0 Up counter (UC3)
0
TA2RUN 0 Up counter (UC2)
0: Stop and clear 1: Run (Count up) Count control 0 Stop and clear 1 Run (Count up)
Note: The values of bits 4 to 6 of TA23RUN are "1" when read.
Figure 3.12.6 Register for TMRA
92CF26A-278
2007-11-21
TMP92CF26A
TMRA45 RUN Register 7
TA45RUN Bit symbol (1110H) Read/Write Reset State Function TA4RDE R/W 0 Double buffer 0: Disable 1: Enable TA4REG double buffer control 0 Disable 1 Enable 0 In IDLE2 mode 0: Stop 1: Operate 0 TMRA45 prescaler
6
5
4
3
I2TA45
2
TA45PRUN R/W
1
TA5RUN 0 Up counter (UC5)
0
TA4RUN 0 Up counter (UC4)
0: Stop and clear 1: Run (Count up) Count control 0 Stop and clear 1 Run (Count up)
Note: The values of bits 4 to 6 of TA45RUN are "1" when read.
TMRA67RUN Register 7
TA67RUN Bit symbol (1118H) Read/Write Reset State Function TA6RDE R/W 0 Double buffer 0: Disable 1: Enable TA6REG double buffer control 0 Disable 1 enable 0 In IDLE2 mode 0: Stop 1: Operate 0 TMRA67 prescaler
6
5
4
3
I2TA67
2
TA67PRUN R/W
1
TA7RUN 0 Up counter (UC7)
0
TA6RUN 0 Up counter (UC6)
0: Stop and clear 1: Run (Count up) Count control 0 Stop and clear 1 Run (Count up)
Note: The values of bits 4 to 6 of TA67RUN are "1" when read.
Figure 3.12.7 Register for TMRA
92CF26A-279
2007-11-21
TMP92CF26A
TMRA01 Mode Register 7
TA01MOD Bit symbol (1104H) Read/Write Reset State Function 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode TMRA0 input clock 00 01 10 11 TMRA1 input clock
TA01MOD01 TA01MOD=01
6
TA01M0 0
5
PWM01 0 PWM cycle 00: Reserved 01: 2
6 7 8
4
PWM00 0 R/W
3
TA1CLK1 0 00: TA0TRG 01: T1 10: T16 11: T256
2
TA1CLK0 0
1
TA0CLK1 0 00: TA0IN pin 01: T1 10: T4 11: T16
0
TA0CLK0 0
TA01M1
Source clock for TMRA1
Source clock for TMRA0
10: 2 11: 2
TA0IN (External input) T1 T4 T16
00 01 10 11 PWM cycle selection 00 01 10 11 TMRA01 operation mode selection 00 01 10 11
Comparator output from TMRA0 T1 T16 T256 Reserved 2 x Source clock
6 7 8
Overflow output from TMRA0 (16-bit timer mode)
2 x Source clock 2 x Source clock 8 timer x 2ch 16-bit timer 8-bit PPG 8-bit PWM (TMRA0), 8-bit timer (TMRA1)
Figure 3.12.8 Register for TMRA
92CF26A-280
2007-11-21
TMP92CF26A
TMRA23 Mode Register 7
TA23MOD Bit symbol (110CH) Read/Write Reset State Function 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode TMRA2 input clock 00 01 10 11 TMRA3 input clock
TA23MOD01 TA23MOD=01
6
TA23M0 0
5
PWM21 0 PWM cycle 00: Reserved 01: 2
6 7 8
4
PWM20 0 R/W
3
TA3CLK1 0 00: TA2TRG 01: T1 10: T16 11: T256
2
TA3CLK0 0
1
TA2CLK1 0 00: TA2IN pin 01: T1 10: T4 11: T16
0
TA2CLK0 0
TA23M1
TMRA3 clock for TMRA3
TMRA2 clock for TMRA2
10: 2 11: 2
TA2IN (External input) T1 T4 T16
00 01 10 11 PWM cycle selection 00 01 10 11 TMRA23 operation mode selection 00 01 10 11
Comparator output from TMRA2 T1 T16 T256 Reserved 2 x Source clock
6 7 8
Overflow output from TMRA2 (16-bit timer mode)
2 x Source clock 2 x Source clock 8 timer x 2ch 16-bit timer 8-bit PPG 8-bit PWM (TMRA2), 8-bit timer (TMRA3)
Figure 3.12.9 Register for TMRA
92CF26A-281
2007-11-21
TMP92CF26A
TMRA45 Mode Register 7
TA45MOD Bit symbol (1114H) Read/Write Reset State Function 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode TMRA4 input clock 00 01 10 11 TMRA5 input clock
TA45MOD01 TA45MOD=01
6
TA45M0 0
5
PWM41 0 PWM cycle 00: Reserved 01: 2
6 7 8
4
PWM40 0 R/W
3
TA5CLK1 0 00: TA4TRG 01: T1 10: T16 11: T256
2
TA5CLK0 0
1
TA4CLK1 0
0
TA4CLK0 0
TA45M1
TMRA5 clock for TMRA5
TMRA4 clock for TMRA4
00: low-frequency clock 01: T1 10: T4 11: T16
10: 2 11: 2
low-frequency clock(fs) T1 T4 T16
00 01 10 11 PWM cycle selection 00 01 10 11 TMRA45 operation mode selection 00 01 10 11
Comparator output from TMRA4 T1 T16 T256
Overflow output from TMRA4 (16-bit timer mode)
Reserved 2 x Source clock
6 7 8
2 x Source clock 2 x Source clock 8 timer x 2ch 16-bit timer 8-bit PPG 8-bit PWM (TMRA4), 8-bit timer (TMRA5)
Figure 3.12.10 Register for TMRA
92CF26A-282
2007-11-21
TMP92CF26A
TMRA67 Mode Register 7
TA67MOD (111CH) Bit symbol Read/Write Reset State Function 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode TMRA6 input clock 00 01 10 11 TMRA1 input clock
TA67MOD01 TA67MOD=01
6
TA67M0 0
5
PWM61 0 PWM cycle 00: Reserved 01: 2
6 7 8
4
PWM60 0 R/W
3
TA7CLK1 0 00: TA6TRG 01: T1 10: T16 11: T256
2
TA7CLK0 0
1
TA6CLK1 0
0
TA6CLK0 0
TA67M1
TMRA7 clock for TMRA7
TMRA6 clock for TMRA6
00: low-frequency clock 01: T1 10: T4 11: T16
10: 2 11: 2
low-frequency clock(fs) T1 T4 T16
00 01 10 11 PWM cycle selection 00 01 10 11 TMRA67 operation mode selection 00 01 10 11
Comparator output from TMRA6 T1 T16 T256 Reserved 2 x Source clock
6 7 8
Overflow output from TMRA6 (16-bit timer mode)
2 x Source clock 2 x Source clock 8 timer x 2ch 16-bit timer 8-bit PPG 8-bit PWM (TMRA6), 8-bit timer (TMRA7)
Figure 3.12.11 Register for TMRA
92CF26A-283
2007-11-21
TMP92CF26A
TMRA1 Flip-Flop Control Register 7
TA1FFCR (1105H) A readBit symbol Read/Write Reset State 1 00: Invert TA1FF 01: Set TA1FF 10: Clear TA1FF 11: Don't care
6
5
4
3
TA1FFC1 R/W
2
TA1FFC0 1
1
TA1FFIE 0 TA1FF control for inversion 0: Disable 1: Enable R/W
0
TA1FFIS 0 TA1FF inversion select 0: TMRA0 1: TMRA1
modify-write Function operation cannot be performed
Inversion signal for timer flip-flop 1 (TA1FF) (Don't care except in 8-bit timer mode) TA1FFIS Inversion of TA1FF TA1FFIE Control of TA1FF 00 01 10 11 Inverts the value of TA1FF (Software inversion) Sets TA1FF to "1" Clears TA1FF to "0" Don't care 0 1 Disabled Enabled 0 1 Inversion by TMRA0 Inversion by TMRA1
Note: The values of bits 4 to 6 of TA1FFCR are "1" when read.
Figure 3.12.12 Register for TMRA
92CF26A-284
2007-11-21
TMP92CF26A
TMRA3 Flip-Flop Control Register 7
TA3FFCR (110DH) A readBit symbol Read/Write Reset State 1 00: Invert TA3FF 01: Set TA3FF 10: Clear TA3FF 11: Don't care
6
5
4
3
TA3FFC1 R/W
2
TA3FFC0 1
1
TA3FFIE 0 TA3FF control for inversion 0: Disable 1: Enable R/W
0
TA3FFIS 0 TA3FF inversion select 0: TMRA2 1: TMRA3
modify-write Function operation cannot be performed
Inversion signal for timer flip-flop 3 (TA3FF) (Don't care except in 8-bit timer mode) TA3FFIS Inversion of TA3FF TA3FFIE Control of TA3FF 00 01 10 11 Inverts the value of TA3FF (Software inversion) Sets TA3FF to "1" Clears TA3FF to "0" Don't care 0 1 Disabled Enabled 0 1 Inversion by TMRA2 Inversion by TMRA3
Note: The values of bits 4 to 6 of TA3FFCR are "1" when read.
Figure 3.12.13 Register for TMRA
92CF26A-285
2007-11-21
TMP92CF26A
TMRA5 Flip-Flop Control Register 7
TA5FFCR (1115H) A readBit symbol Read/Write Reset State 1 00: Invert TA5FF 01: Set TA5FF 10: Clear TA5FF 11: Don't care
6
5
4
3
TA5FFC1 R/W
2
TA5FFC0 1
1
TA5FFIE 0 TA5FF control for inversion 0: Disable 1: Enable R/W
0
TA5FFIS 0 TA5FF inversion select 0: TMRA4 1: TMRA5
modify-write Function operation cannot be performed
Inversion signal for timer flip-flop 5 (TA5FF) (Don't care except in 8-bit timer mode) TA5FFIS Inversion of TA5FF TA5FFIE Control of TA5FF 00 01 10 11 Inverts the value of TA5FF (Software inversion) Sets TA5FF to "1" Clears TA5FF to "0" Don't care 0 1 Disabled Enabled 0 1 Inversion by TMRA4 Inversion by TMRA5
Note: The values of bits 4 to 6 of TA5FFCR are "1" when read.
Figure 3.12.14 Register for TMRA
92CF26A-286
2007-11-21
TMP92CF26A
TMRA7 Flip-Flop Control Register 7
TA7FFCR (111DH) A readBit symbol Read/Write Reset State 1 00: Invert TA7FF 01: Set TA7FF 10: Clear TA7FF 11: Don't care
6
5
4
3
TA7FFC1 R/W
2
TA7FFC0 1
1
TA7FFIE 0 TA7FF control for inversion 0: Disable 1: Enable R/W
0
TA7FFIS 0 TA7FF inversion select 0: TMRA6 1: TMRA7
modify-write Function operation cannot be performed
Inversion signal for timer flip-flop 7 (TA7FF) (Don't care except in 8-bit timer mode) TA7FFIS Inversion of TA7FF TA7FFIE Control of TA7FF 00 01 10 11 Inverts the value of TA7FF (Software inversion) Sets TA7FF to "1" Clears TA7FF to "0" Don't care 0 1 Disabled Enabled 0 1 Inversion by TMRA6 Inversion by TMRA7
Note: The values of bits 4 to 6 of TA7FFCR are "1" when read.
Figure 3.12.15 Register for TMRA
92CF26A-287
2007-11-21
TMP92CF26A
Timer Registers 7
TA0REG (1102H) TA1REG (1103H) TA2REG (110AH) TA3REG (110BH) TA4REG (1112H) TA5REG (1113H) TA6REG (111AH) TA7REG (111BH) bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State 0 0 0 0 0 - 0 - 0 - 0 - W 0 0 0 0 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - -
6
-
5
-
4
- W
3
- 0 -
2
- 0 -
1
- 0 -
0
- 0 -
Note: A read-modify-write operation cannot be performed for All registers.
Figure 3.12.16 TMRA Registers
92CF26A-288
2007-11-21
TMP92CF26A 3.12.4 Operation in Each Mode
(1) 8-bit timer mode Both TMRA0 and TMRA1 can be used independently as 8-bit interval timers. a. Generating interrupts at a fixed interval (Using TMRA1) To generate interrupts at constant intervals using TMRA1 (INTTA1), first stop TMRA1 then set the operation mode, input clock and a cycle to TA01MOD and TA1REG register respectively. Then, enable the interrupt INTTA1 and start TMRA1 counting.
Example: To generate an INTTA1 interrupt every 20 s at fSYS= 50 MHz, set each register as follows; * Clock state Clcok gear : 1/1
Prescaler of clock gear :1/2 MSB 7 TA01RUN TA01MOD TA1REG INTETA1 TA01RUN - 0 0 X - 6 X 0 1 1 X 5 X X 1 0 X 4 X X 1 1 X 3 - 0 1 X - 2 - 1 1 - 1 LSB 1 0 X 0 - 1 0 - X 1 - - Stop TMRA1 and clear it to 0. Select 8-bit timer mode and select T1 (0.16 s at fSYS = 50 MHz) as the input clock. Set TA1REG to 20 s / T1 = 125(7DH) Enable INTTA1 and set it to level 5. Start TMRA1 counting.
X: Don't Care, -: No change
Select the input clock using Table 3.12.2.
Note: The input clocks for TMRA0 and TMRA1 are different from as follows. TMRA0: TA0IN input, T1, T4 or T16. TMRA1: Matches output of TMRA0, T1, T16, and T256.
92CF26A-289
2007-11-21
TMP92CF26A
b. Generating a 50% duty ratio square wave pulse The state of the timer flip-flop (TA1FF) is inverted at constant intervals and its status output via the timer output pin (TA1OUT).
Example: To output a 3.2s square wave pulse from the TA1OUT pin at fSYS = 50 MHz, use the following procedure to make the appropriate register settings. This example uses TMRA1; however, either TMRA0 or TMRA1 may be used. * Clock state Clcok gear : 1/1
Prescaler of clock gear : 1/2 7 TA01RUN TA01MOD TA1REG TA1FFCR PM PMFC - 0 0 X - - 6 X 0 0 X X X 5 X X 0 X X X 4 X X 0 X X X X 3 - 0 1 1 X X - 2 - 1 0 0 - - 1 1 0 X 1 1 0 1 1 0 - X 0 1 X X - Stop TMRA1 and clear it to "0". Select 8-bit timer mode and select T1 (0.16 s at fSYS = 50 MHz) as the input clock. Set the timer register to 3.2 s / T1 / 2 = 0AH Clear TA1FF to "0" and set it to invert on the match detect signal from TMRA1. Set PM1 to function as the TA1OUT pin. Start TMRA1 counting.
TA01RUN - X X X: Don't care, -: No change
T1 TA01RUN Bit7 to Bit2 Up counter Bit1 Bit0 Comparator timing Comparator output (Match detect) INTTA1 UC1 clear TA1FF TA1OUT 1.6 s at fC = 50 MHz 0 1 2 3 0 1 2 3 0 1 2 3 0
Figure 3.12.17 Square Wave Output Timing Chart (50% duty)
92CF26A-290
2007-11-21
TMP92CF26A
c. Making TMRA1 count up on the match signal from the TMRA0 comparator Select 8-bit timer mode and set the comparator output from TMRA0 to be the input clock to TMRA1.
Comparator output (TMRA0 match) TMRA0 up counter (when TA0REG = 5) TMRA1 up counter (when TA1REG = 2) TMRA1 match output 1 2 3 1 4 5 1 2 3 2 4 5 1 2 1 3
Figure 3.12.18 TMRA1 Count Up on Signal from TMRA0 (2) 16 bit timer mode Pairing the two 8-bit timers TMRA0 and TMRA1 configures a 16-bit interval timer. To make a 16-bit interval timer in which TMRA0 and TMRA1 are cascaded together, set TA01MOD to 01. In 16-bit timer mode, the overflow output from TMRA0 is used as the input clock for TMRA1, regardless of the value set in TA01MOD. Table 3.12.2shows the relationship between the timer (Interrupt) cycle and the input clock selection.
Example: To generate an INTTA1 interrupt every 0.13 s at fSYS = 50 MHz, set the timer registers TA0REG and TA1REG as follows: * Clock state Clcok gear : 1/1
Prescaler of clock gear : 1/2
If T16 (2.6 s at fSYS = 50 MHz) is used as the input clock for counting, set the following value in the registers: 0.13 s / 2.6 s = 50000 = C350H; e.g. set TA1REG to C3H and TA0REG to 50H.
92CF26A-291
2007-11-21
TMP92CF26A
The comparator match signal is output from TMRA0 each time the up counter UC0 matches TA0REG, though the up counter UC0 is not cleared. In the case of the TMRA1 comparator, the match detect signal is output on each comparator pulse on which the values in the up counter UC1 and TA1REG match. When the match detect signal is output simultaneously from both the comparator TMRA0 and TMRA1, the up counters UC0 and UC1 are cleared to 0 and the interrupt INTTA1 is generated. Also, if inversion is enabled, the value of the timer flip-flop TA1FF is inverted. Example: When TA1REG = 04H and TA0REG = 80H
Value of up counter (UC1, UC0) TMRA0 comparator match detect signal TMRA1 comparator match detect signal Interrupt INTTA0 Interrupt INTTA1 Timer output TA1OUT Inversion 0080H 0180H 0280H 0380H 0480H 0080H
Figure 3.12.19 Timer Output by 16-Bit Timer Mode
(3) 8-bit PPG (Programmable pulse generation) output mode Square wave pulses can be generated at any frequency and duty ratio by TMRA0. The output pulses may be active-low or active-high. In this mode TMRA1 cannot be used. TMRA0 outputs pulses on the TA1OUT pin.
tH = "10" t tL = "01" t Example: = "01" TA0REG and UC0 match (Interrupt INTTA0) TA1REG and UC0 match (Interrupt INTTA1) TA1OUT TA0REG TA1REG tH tL
Figure 3.12.20 8-Bit PPG Output Waveforms
92CF26A-292
2007-11-21
TMP92CF26A
In this mode a programmable square wave is generated by inverting the timer output each time the 8-bit up counter (UC0) matches the value in one of the timer registers TA0REG or TA1REG. The value set in TA0REG must be smaller than the value set in TA1REG. Although the up counter for TMRA1 (UC1) is not used in this mode, TA01RUN should be set to 1 so that UC1 is set for counting. Figure 3.12.21 shows a block diagram representing this mode.
TA01RUN TA0IN T1 T4 T16 Selector 8-bit up counter (UC0) TA1FF TA1FFCR TA1OUT
TA01MOD
Inversion INTTA0
Comparator
Comparator
INTTA1
Selector
TA0REG Shift trigger
TA0REG-WR TA01RUN Register buffer TA1REG
Internal data bus
Figure 3.12.21 Block Diagram of 8-Bit PPG Output Mode If the TA0REG double buffer is enabled in this mode, the value of the register buffer will be shifted into TA0REG each time TA1REG matches UC0. Use of the double buffer facilitates the handling of low-duty waves (when duty is varied).
Match with TA0REG and up counter Match with TA1REG TA0REG (Value to be compared) Register buffer Shift from register buffer Q1 Q2 Q2 Q3 TA0REG (Register buffer) write
(Up counter = Q1)
(Up counter = Q2)
Figure 3.12.22 Operation of Register Buffer
set , the match-detect signal goes active when the up-counter overfolws.
Note: The values that can be set in TAxREG renge from 01h to 00h (equivalent to 100h). If the maximum value 00h is
92CF26A-293
2007-11-21
TMP92CF26A
Example:
To generate 1/4 duty 31.25 kHz pulses (at fSYS= 50 MHz)
32 s * Clock state Clcok gear : 1/1
Prescaler of clock gear : 1/2 Calculate the value which should be set in the timer register. To obtain a frequency of 31.25 kHz, the pulse cycle t should be: t = 1/31.25kHz = 32 s T1 = 0.16 s (at 50 MHz); 32 s / 0.16 s = 200 Therefore set TA1REG to 200 (C8H) The duty is to be set to 1/4: t x 1/4 = 32 s x 1/4 = 8 s 8 s / 0.16 s = 50 Therefore, set TA0REG = 50 = 32H. 7 TA01RUN TA01MOD TA0REG TA1REG TA1FFCR PM PMFC TA01RUN - 1 0 1 X - - 1 6 X 0 0 1 X X X X 5 X X 0 0 X X X X 4 X X 0 0 X X X X 3 - X 1 1 0 X X - 2 - X 0 0 1 - - 1 1 0 0 1 0 1 0 1 1 0 0 1 0 0 X X X 1 Stop TMRA0 and TMRA1 and clear it to "0". Set the 8-bit PPG mode, and select T1 as input clock. Write 32H. Write C8H. Set TA1FF, enabling both inversion and the double buffer. Writing 10 provides negative logic pulse. Set PM1 as the TA1OUT pin. Start TMRA0 and TMRA1 counting.
X: Don't care, -: No change
92CF26A-294
2007-11-21
TMP92CF26A
(4) 8-bit PWM (Pulse width modulation) output mode This mode is only valid for TMRA0. In this mode, a PWM pulse with the maximum resolution of 8 bits can be output. When TMRA0 is used the PWM pulse is output on the TA1OUT pin (Shared with PM1). TMRA1 can also be used as an 8-bit timer. The timer output is inverted when the up counter (UC0) matches the value set in the timer register TA0REG or when 2n counter overflow occurs (n = 6, 7 or 8 as specified by TA01MOD). The up counter UC0 is cleared when 2n counter overflow occurs. The following conditions must be satisfied before this PWM mode can be used. Value set in TA0REG < Value set for 2n counter overflow Value set in TA0REG 0
TA0REG and UC0 match 2 overflow (INTTA0 interrupt)
n
TA1OUT tPWM (PWM cycle)
Figure 3.12.23 8-Bit PWM Waveforms
Figure 3.12.24 shows a block diagram representing this mode.
TA01RUN TA0IN T1 T4 T16 8-bit up counter (UC0) TA1OUT TA1FFCR
Selector
Clear
TA1FF
Inversion 2 overflow control
n
TA01MOD
TA01MOD
Comparator
Overflow
INTTA0 TA0REG Selector TA0REG-WR Shift trigger Register buffer
TA01RUN
Internal data bus
Figure 3.12.24 Block Diagram of 8-Bit PWM Mode
92CF26A-295
2007-11-21
TMP92CF26A
In this mode the value of the register buffer will be shifted into TA0REG if 2n overflow is detected when the TA0REG double buffer is enabled. Use of the double buffer facilitates the handling of low duty ratio waves.
Match with TA0REG Up counter = Q1 2 overflow Shift into TA0REG(Register buffer0) TA0REG (Value to be compared) Register buffer0 Q1 Q2 Q2 Q3 TA0REG (Register buffer0) write
n
Up counter = Q2
Figure 3.12.25 Register Buffer Operation
Example: To output the following PWM waves on the TA1OUT pin (at fSYS = 50 MHz).
16.0 s 20.48 s * Clock state Clcok gear : 1/1
Prescaler of clock gear : 1/2
To achieve a 20.48s PWM cycle by setting T1 to 0.16 s (at fSYS = 50 MHz): 20.48 s / 0.16 s = 128 2 = 128
n
Therefore n should be set to 7. Since the low level period is 16.0 s when T1 = 0.16 s, set the following value for TAREG: 16.0 s / 0.16 s = 100 = 64H MSB 7 TA01RUN TA01MOD TA0REG TA1FFCR PM PMFC TA01RUN - 1 0 X - - 1 6 X 1 1 X X X X 5 X 1 1 X X X X 4 X 0 0 X X X X 3 - X 0 1 X X - 2 - X 1 0 - - 1 LSB 1 - 0 0 1 0 1 - 0 0 1 0 X X X 1 Stop TMRA0 and clear it to 0 Select 8-bit PWM mode (cycle: 2 ) and select T1 as the
7
input clock. Write 64H. Clear TA1FF to 0, enable the inversion and double buffer.
Set PM1 as the TA1OUT pin. Start TMRA0 counting.
X: Don't care, -: No change
92CF26A-296
2007-11-21
TMP92CF26A
Table 3.12.3 PWM Cycle
Clock gear selection SYSCR1 Prescaler of clock gear SYSCR0
PWM cycle TAxxMOD 2 (x64) TAxxMOD T1(x2) T4(x8)
2048/fc 4096/fc 8192/fc 16384/fc 32768/fc 8192/fc 16384/fc 32768/fc 65536/fc 131072/fc
6
2 (x128) TAxxMOD T1(x2)
1024/fc 2048/fc 4096/fc 8192/fc 16384/fc 4096/fc 8192/fc 16384/fc 32768/fc 65536/fc
7
2 (x256) TAxxMOD T1(x2)
2048/fc 4096/fc 8192/fc 16384/fc 32768/fc 8192/fc 16384/fc 32768/fc 65536/fc 131072/fc
8
T16(x32)
8192/fc 16384/fc 32768/fc 65536/fc 131072/fc 32768/fc 65536/fc 131072/fc 262144/fc 524288/fc
T4(x8)
4096/fc 8192/fc 16384/fc 32768/fc 65536/fc 16384/fc 32768/fc 65536/fc 131072/fc 262144/fc
T16(x32)
16384/fc 32768/fc 65536/fc 131072/fc 262144/fc 65536/fc 131072/fc 262144/fc 524288/fc 1048576/fc
T4(x8)
8192/fc 16384/fc 32768/fc 65536/fc 131072/fc 32768/fc 65536/fc 131072/fc 262144/fc 524288/fc
T16(x32)
32768/fc 65536/fc 131072/fc 262144/fc 524288/fc 131072/fc 262144/fc 524288/fc 1048576/fc 2097152/fc
000(x1) 001(x2) 010(x4) 011(x8) 1/fc 100(x16) 000(x1) 001(x2) 010(x4) 011(x8) 100(x16) 1(x8) x2 0(x2)
512/fc 1024/fc 2048/fc 4096/fc 8192/fc 2048/fc 4096/fc 8192/fc 16384/fc 32768/fc
(5) Settings for each mode Table 3.12.4 shows the SFR settings for each mode. Table 3.12.4 Timer Mode Setting Registers
Register Name Function Timer Mode TA01MOD PWM Cycle Upper Timer Input Clock Lower timer 8-bit timer x 2 channels 00 - match T1, T16, T256 (00, 01, 10, 11) 16-bit timer mode 01 - - Lower Timer Input Clock External clock T1, T4, T16 (00, 01, 10, 11) External clock T1, T4, T16 (00, 01, 10, 11) External clock 8-bit PPG x 1 channel 10
6
TA1FFCR TA1FFIS Timer F/F Invert Signal Select 0: Lower timer output 1: Upper timer output
-
-
7 8
-
T1, T4, T16 (00, 01, 10, 11) External clock
-
8-bit PWM x 1 channel
11
2 ,2 ,2
(01, 10, 11) -
- T1, T16, T256 (01, 10, 11)
T1, T4, T16 (00, 01, 10, 11) -
-
8-bit timer x 1 channel -: Don't care
11
Output disabled
92CF26A-297
2007-11-21
TMP92CF26A
3.13 16 bit timer / Event counter (TMRB)
The TMP92CF26A incorporates two multifunctional 16-bit timer/event counter (TMRB0, TMRB1) which have the following operation modes: * 16 bit interval timer mode * 16 bit event counter mode * 16 bit programmable pulse generation mode (PPG) Can be used following operation modes by capture function. * Frequency measurement mode * Pulse width measurement mode The timer/event counter consists of a 16-bit up counter, two 16-bit timer registers (one of them with a double-buffer structure), a 16-bit capture registers two comparators, a capture input controller, a timer flip-flop and a control circuit. The timer/event counter is controlled by an 11-byte control SFR. Each channel (TMRB0,TMRB1) operate independently. In this section, the explanation describes only for TMRB0 because each channel is identical operation except for the difference as follows;
Table 3.13.1 Difference between TMRB0 and TMRB1 Channel Specification
External clock/ capture trigger input pins External pins Timer flip-flop output pins Timer run register Timer mode register Timer flip-flop control register SFR (Address)
TMRB0
TB0IN0 (Shared with PP4) TB0OUT0 (Shared with PP6) TB0RUN (1180H) TB0MOD (1182H) TB0FFCR (1183H) TB0RG0L (1188H)
TMRB1
TB1IN0 (Shared with PP5) TB1OUT0 (Shared with PP7) TB1RUN (1190H) TB1MOD (1192H) TB1FFCR (1193H) TB1RG0L (1198H) TB1RG0H (1199H) TB1RG1L (119AH) TB1RG1H (119BH) TB1CP0L (119CH) TB1CP0H (119DH) TB1CP1L (119EH) TB1CP1H (119FH)
Timer register
TB0RG0H (1189H) TB0RG1L (118AH) TB0RG1H (118BH) TB0CP0L (118CH) TB0CP0H (118DH) TB0CP1L (118EH) TB0CP1H (118FH)
Capture register
92CF26A-298
2007-11-21
3.13.1
Internal data bus
Internal data bus
Interrupt output register 0 register 1 INTTB00 INTTB01
Prescaler clock T0TMR TB0RUN Capture register 0 TB0CP0H/L Timer flip-flop Timer TB0RUN flip-flop control Slelector Count clock 16-bit up counter (UC10) TB0MOD TB0FF0 Caputure register 1 TB0CP1H/L T16 TB0MOD
2
4
8
16 32
Run/ clear
External INT input INT6
T1
T4
Block diagram
Timer flip-flop output
TA1OUT
(from TMRA01) TB0IN0
Capture, external interrupt input control
TB0OUT0
TB1MOD T1 T4 T16
Figure 3.13.1 Block diagram of TMRB0
92CF26A-299
TB0MOD 16-bit comparator (CP10) Match detection 16-bit timer register TB0RG0H/L Register buffer 10 Internal data bus
Match detection 16-bit comparator (CP11)
16-bit time register TB0RG1H/L
TB0RUN
TMP92CF26A
2007-11-21
Intenal data bus
Internal data bus Internal data bus
Interrupt output register 0 register 1 INTTB10 INTTB11
Prescaler clock T0TMR 16 32 T16 TB1MOD Timer TB1RUN flip-flop control Slelector Count clock 16-bit up counter (UC12) TB1MOD TB1FF0 Capture register 0 TB1CP0H/L Caputure register 1 TB1CP1H/L Timer flip-flop Run/ clear TB1RUN
2
4
8
External INT input INT7
T1
T4
Timer flip-flop output
TA3OUT
(from TMRA01) TB1IN0
Capture, external interrupt input control
TB1OUT0
TB1MOD T1 T4 T16
Figure 3.13.2 Block diagram of TMRB1
92CF26A-300
TB1MOD 16-bit comparator (CP12) Match detection 16-bit timer register TB1RG0H/L Register buffer 12 Internal data bus
Match detection 16-bit comparator (CP13)
16-bit time register TB1RG1H/L
TB1RUN
TMP92CF26A
2007-11-21
Intenal data bus
TMP92CF26A 3.13.2 Operation
(1) Prescaler The 5-bit prescaler generates the source clock for TMRB0. The prescaler clock (T0TMR) is selected by the register SYSCR0 of clock gear. This prescaler can be started or stopped using TB0RUN. Counting starts when is set to "1"; the prescaler is cleared to "0" and stops operation when is cleared to "0". The resolution of prescaler is showed in the Table 3.13.2. Table 3.13.2 Prescaler Clock Resolution
Clock gear selection SYSCR1 000(1/1) 001(1/2) 010(1/4) 011(1/8) fc 100(1/16) 000(1/1) 001(1/2) 010(1/4) 011(1/8) 100(1/16) 1(1/8) 1/2 0(1/2) Prescaler of clock gear SYSCR0 - Timer counter input clock Prescaler of TMRB TBxMOD T1(1/2) fc/8 fc/16 fc/32 fc/64 fc/128 fc/32 fc/64 fc/128 fc/256 fc/512 T4(1/8) fc/32 fc/64 fc/128 fc/256 fc/512 fc/128 fc/256 fc/512 fc/1024 fc/2048 T16(1/32) fc/128 fc/256 fc/512 fc/1024 fc/2048 fc/512 fc/1024 fc/2048 fc/4096 fc/8192
(2) Up counter (UC10) UC10 is a 16-bit binary counter which counts up pulses input from the clock specified by TB0MOD. Any one of the prescaler internal clocks T1, TB0 and T16 or an external clock input via the TB0IN0 pin can be selected as the input clock. Counting or stopping and clearing of the counter is controlled by TB0RUN. When clearing is enabled, the up counter UC10 will be cleared to "0" each time its value matches the value in the timer register TB0RG1H/L. If clearing is disabled, the counter operates as a free running counter. Clearing can be enabled or disabled using TB0MOD.
92CF26A-301
2007-11-21
TMP92CF26A
(3) Timer registers (TB0RG0H/L, TB0RG1H/L) These two 16-bit registers are used to set the interval time. When the value in the up counter UC10 matches the value set in this timer register, the comparator match detect signal will go active. Setting data for both upper and lower timer registers is always needed. For example, eithre using a 2-byte data transfer instruction or using a 1-byte data transfer instruction twice for the lower 8 bits and upper 8 bits in order. (The compare circuit will not operate if only the lower 8 bits are written. Be sure to write to both timer registers (16 bits) from the lower 8 bits followed by the upper 8 bits.) The TB0RG0H/L timer register has a double-buffer structure, which is paired with a register buffer 10. The value set in TB0RUN determines whether the double-buffer structure is enabled or disabled: it is disabled when = "0", and enabled when = "1". When the double buffer is enabled, data is transferred from the register buffer 10 to the timer register when the values in the up counter (UC10) and the timer register TB0RG1H/L match. The double buffer circuit incorporates two flags to indicate whether or not data is written to the lower 8 bits and the upper 8 bits of the register buffer, respectively. Only when both flags are set can data be transferred from the register buffer to the timer register by a match between the up-counter UC10 and the timer register TB0RG1. This data transfer is performed so long as 16-bit data is written in the register buffer regardless of the register buffer to the timer register unexpectedly as explained below. For example, let us assume that an interrupt occurs when only the lower 8 bits (L1) of the register buffer data (H1L1) have been written and the interrupt routine includes writes to all 16 bits in the register buffer and a transfer of the data to the timer register. In this case, if the higher 8 bits (H1) are written after the interrupt routine is completed, only the flag for the higher 8 bits will be set, the flag for the lower 8 bits having been cleared in the interrupt routine. Therefore, even if a match occurs between UC10 and TB0RG1, no data transfer will be performed. Then, in an attempt to set the next set of data (H2L2) in the register buffer, when the lower 8 bits (L2) are written, this will cause the flag for the lower 8 bits to be set as well as the flag for the higher 8 bits which has been set by writing the previous data (H1). If a match between UC10 and TB0RG1 occurs before the higher 8 bits (H2) are written, this will cause unexpected data (H1L2) to be sent to the timer register instead of the intended data (H2L2). To avoid such transfer timing problems due to interrupts, the DI instruction (disable interrupts) and the EI (enable interrupts) can be executed before and after setting data in the register buffer, respectively. After a reset, TB0RG0H/L and TB0RG1H/L are undefined. If the 16-bit timer is to be used after a reset, data should be written to it beforehand. On a reset is initialized to "0", disabling the double buffer. To use the double buffer, write data to the timer register, set to "1", then write data to the register buffer 10 as shown below.
92CF26A-302
2007-11-21
TMP92CF26A
TB0RG0H/L and the register buffer 10 both have the same memory addresses (1188H and 1189H) allocated to them. If = "0", the value is written to both the timer register and the register buffer 10. If = "1", the value is written to the register buffer 10 only. The addresses of the timer registers are as follows:
TMRB0 TB0RG0H/L Upper 8 bits (TB0RG0H) 1189H Lower 8 bits (TB0RG0L) 1188H TB0RG1 H/L Upper 8 bits (TB0RG1H) 118BH Lower 8 bits (TB0RG1L) 118AH
TMRB1 TB1RG0 H/L Upper 8 bits (TB1RG0H) 1199H Lower 8 bits (TB1RG0L) 1198H TB1RG1 H/L Upper 8 bits (TB1RG1H) 119BH Lower 8 bits (TB1RG1L) 119AH
The timer registers are write-only registers and thus cannot be read.
92CF26A-303
2007-11-21
TMP92CF26A
(4) Capture registers (TB0CP0H/L, TB0CP1H/L) These 16-bit registers are used to latch the values in the up counter (UC10). All 16 bits of data in the capture registers should be read. For example, using a 2-byte data load instruction or two 1-byte data load instructions. The least significant byte is read first, followed by the most significant byte. (during capture is read, capture operation is prohibited. In that case, the lower 8 bits should be read first, followed by the 8 bits.) The addresses of the capture registers are as follows;
TMRB0 TB0CP0H/L Upper 8 bits (TB0CP0H) 118DH Lower 8 bits (TB0CP0L) 118CH TB0CP1H/L Upper 8 bits (TB0CP1H) 118FH Lower 8 bits (TB0CP1L) 118EH
TMRB1 TB1CP0H/L Upper 8 bits (TB1CP0H) 119DH Lower 8 bits (TB1CP0L) 119CH TB1CP1H/L Upper 8 bits (TB1CP1H) 119FH Lower 8 bits (TB1CP1L) 119EH
The capture registers are read-only registers and thus cannot be written to.
(5) Capture input and external interrupt control This circuit controls the timing to latch the value of the up-counter UC10 into TB0CP0H/L and TB0CP1H/L, and generates external interrupt.The latch timing of capture register and selection of edge for external interrupt is controlled by TB0MOD. The value in the up-counter (UC10) can be loaded into a capture register by software. Whenever 0 is written to TB0MOD, the current value in the up counter (UC10) is loaded into capture register TB0CP0H/L. It is necessary to keep the prescaler in RUN mode (i.e., TB0RUN must be held at a value of 1).
92CF26A-304
2007-11-21
TMP92CF26A
(6) Comparators (CP10, CP11) CP10 and CP11 are 16-bit comparators which compare the value in the up counter UC10 with the value set in TB0RG0H/L or TB0RG1H/L respectively, in order to detect a match. If a match is detected, the comparator generates an interrupt (INTTB00 or INTTB01 respectively). (7) Timer flip-flops (TB0FF0) These flip-flops are inverted by the match detect signals from the comparators and the latch signals to the capture registers. Inversion can be enabled and disabled for each element using TB0FFCR. After a reset the value of TB0FF0 is undefined. If "00" is written to TB0FFCR , TB0FF0 will be inverted. If "01" is written to the capture registers, the value of TB0FF0 will be set to "1". If "10" is written to the capture registers, the value of TB0FF0 will be set to "0".
Note: If an inversion by the match-detect signal and a setting change via the TB0FFCR register occurs simultaneously, the resultant operation varies depending on the situation, as shown below. * If an inversion by the match-detect signal and an inversion via the register occur simultaneously, the flip-flop will be inverted only once. * * If an inversion by the match-detect siganl and an attempt to set the flip-flop to 1 via the register occur simultaneously, the flip-flop will be set to 1. If an inversion by the match-detect signal and an attmept to cleare the flip-flop to 0 via the register occur simultanerously, the flip-flop will be cleared to 0.
If an inversion by match-detect signal and inversion disable setting occur simultaneously, two case (it is inverted and it is not inverted) are occurred. Therefore, if changing inversion control (inversion enable/disable), stop timer operation beforehand. The values of TB0FF0 can be output via the timer output pins TB0OUT0 (which is shared with PP6) and TB0OUT1 (which is shared with PP7). Timer output should be specified using the port P function register.
92CF26A-305
2007-11-21
TMP92CF26A 3.13.3 SFR
TMRB0 RUN Register 7
TB0RUN Bit symbol (1180H) Read/Write Reset State Function buffer 0: disable 1: enable Count operation , 0 1 Stop and clear Count up TB0RDE R/W 0 Double "0"
6
- R/W 0 Always write
5
4
3
I2TB0 R/W 0 In IDLE2 mode 0: Stop 1: Operate
2
TB0PRUN R/W 0 TMRB0 prescaler 0: Stop and clear 1: Run (Count up)
1
0
TB0RUN R/W 0 Up counter (UC10)
Note: 1, 4 and 5 of TB0RUN are read as "1" values.
TMRB1 RUN Register 7
TB1RUN Bit symbol (1190H) Read/Write Reset State Function buffer 0: disable 1: enable Count operation , 0 1 Stop and clear Count up TB1RDE R/W 0 Double "0"
6
- R/W 0 Always write
5
4
3
I2TB1 R/W 0 In IDLE2 mode 0: Stop 1: Operate
2
TB1PRUN R/W 0 TMRB1 prescaler 0: Stop and clear 1: Run (Count up)
1
0
TB1RUN R/W 0 Up counter (UC12)
Note: 1, 4 and 5 of TB1RUN are read as "1" values.
Figure 3.13.3 Register for TMRB
92CF26A-306
2007-11-21
TMP92CF26A
TMRB0 Mode Register 7
TB0MOD (1182H) A readBit symbol Read/Write Reset State 0
Always write "0".
6
- R/W 0
5
TB0CP0I W* 1
Software capture control 0: Software capture 1:Undefined
4
3
2
TB0CLE R/W 0
Control Up counter 0:Disable 1:Enable
1
TB0CLK1 0
00: TB0IN0 input 01: T1 10: T4 11: T16
0
TB0CLK0 0
-
TB0CPM1 TB0CPM0 0
Capture timing 00:Disable INT6 occurs at rising edge 01:TB0IN0 INT6 occurs at rising edge 10: TB0IN0 TB0IN0 INT6 occurs at falling edge 11: TA1OUT TA1OUT INT6 occurs at rising edge
0
modify-write Function operation cannot be performed
TMRB0 source clock
TMRB0 source clock 00 01 10 11 TB0IN0 pin input T1 T4 T16
Control clearing for up counter (UC10) 0 1 Disable Enable clearing by match with TB0RG1H/L
Capture/interrupt timing Capture control 00 01 10 11 Disable
Capture to TB0CP0H/L at rising edge of TB0IN0 Capture to TB0CP0H/L at rising edge of TB0IN0 Capture to TB0CP1H/L at falling edge of TB0IN0 Capture to TB0CP0H/L at rising edge of TA1OUT Capture to TB0CP1H/L at falling edge of TA1OUT
INT6 control
INT6 occurs at the rising edge of TB0IN0 INT6 occurs at the rising edge of TB0IN0 INT6 occurs at the rising edge of TB0IN0
Software capture 0 1 The value of up counter is captured to TB0CP0H/L Undefined
Figure 3.13.4 Register for TMRB
92CF26A-307
2007-11-21
TMP92CF26A
TMRB1 Mode Register 7
TB1MOD (1192H) A readBit symbol Read/Write Reset State 0 Always write "0". - R/W 0
6
-
5
TB1CP0I W* 1
Software capture control 0: Software capture 1:Undefined
4
3
2
TB1CLE R/W 0
Control Up counter 0:Disable 1:Enable
1
TB1CLK1 0
00: TB1IN0 input 01: T1 10: T4 11: T16
0
TB1CLK0 0
TB1CPM1 TB1CPM0 0
Capture timing 00:Disable INT7 occurs at rising edge 01:TB1IN0 INT7 occurs at rising edge 10: TB1IN0 TB1IN0 INT7 occurs at falling edge 11: TA3OUT TA3OUT INT7 occurs at rising edge
0
modify-write Function operation cannot be performed
TMRB1 source clock
TMRB1 source clock 00 01 10 11 TB1IN0 pin input T1 T4 T16
Control clearing for up counter (UC12) 0 1 Disable Enable clearing by match with TB1RG1H/L
Capture/interrupt timing Capture control 00 01 10 11
Disable Capture to TB1CP0H/L at rising edge of TB1IN0 Capture to TB1CP0H/L at rising edge of TB1IN0 Capture to TB1CP1H/L at falling edge of TB1IN0
INT7 control
INT7 occurs at the rising edge of TB1IN0 INT7 occurs at the rising edge of TB1IN0
Capture to TB1CP0H/L at rising edge of TA3OUT INT7 occurs at the rising Capture to TB1CP1H/L at falling edge of TA3OUT edge of TB1IN0
Software capture 0 1 The value of up counter is captured to TB1CP0H/L Undefined
Figure 3.13.5 Register for TMRB
92CF26A-308
2007-11-21
TMP92CF26A
TMRB0 Flip-Flop Control Register 7
TB0FFCR (1183H) A read Bit symbol Read/Write Reset State 1 - W* 1 0 0 Always write "11" *Always read as "11".
6
-
5
TB0C1T1
4
TB0C0T1
3
TB0E1T1
2
TB0E0T1
1
TB0FF0C1
0
TB0FF0C0
R/W 0 0 1 TB0FF0 inversion trigger 0: Disable trigger 1: Enable trigger
When capture UC10 to TB0CP1H/L When capture UC10 to TB0CP0H/L When UC10 When UC10 matches with matches with
W* 1 Control TB0FF0 00: Invert 01: Set 10: Clear 11: Undefined *Always read as "11".
-modify-write Function operation cannot be performed
TB0RG1H/L TB0RG0H/L
Timer flip-flop control(TB0FF0) 00 01 10 11 Invert Set to "11" Clear to "00" Undefined (Always read as "11")
TB0FF0 control Inverted when UC10 value matches the valued in TB0RG0H/L 0 1 Disable trigger Enable trigger
TB0FF0 control Inverted when UC10 value matches the valued in TB0RG1H/L 0 1 Disable trigger Enable trigger
TB0FF0 control Inverted when UC10 value is captured into TB0CP0H/L 0 1 Disable trigger Enable trigger
TB0FF0 control Inverted when UC10 value is captured into TB0CP1H/L 0 1 Disable trigger Enable trigger
Figure 3.13.6 Register for TMRB
92CF26A-309
2007-11-21
TMP92CF26A
TMRB1 Flip-Flop Control Register 7
TB1FFCR (1193H) A readmodify-write operation cannot be performed *Always read as "11". Bit symbol Read/Write Reset State Function 1 Always write "11" - W* 1 0 0: Disable trigger 1: Enable trigger
When capture UC12 to TB1CP1H/L When capture UC12 to TB1CP0H/L matches with matches with
6
-
5
TB1C1T1
4
TB1C0T1
3
TB1E1T1
2
TB1E0T1
1
TB1FF0C1
0
TB1FF0C0
R/W 0 0 0 1 TB1FF0 inversion trigger
W* 1 Control TB1FF0 00: Invert 01: Set
When UC12 When UC12 10: Clear
11: Don't care
TB1RG1H/L TB1RG0H/L *Always read as "11".
Timer flip-flop control(TB1FF0) 00 01 10 11 TB1FF0 control Inverted when UC12 value matches the valued in TB1RG0H/L 0 1 Disable trigger Enable trigger Invert Set to "11" Clear to "00" Don't care
TB1FF0 control Inverted when UC12 value matches the valued in TB1RG1H/L 0 1 Disable trigger Enable trigger
TB1FF0 control Inverted when UC12 value is captured into TB1CP0H/L 0 1 Disable trigger Enable trigger
TB1FF0 control Inverted when UC12 value is captured into TB1CP1H/L 0 1 Disable trigger Enable trigger
Figure 3.13.7 Register for TMRB
92CF26A-310
2007-11-21
TMP92CF26A
TMRB0 register 7
TB0RG0L (1188H) TB0RG0H (1189H) TB0RG1L (118AH) TB0RG1H (118BH) TB1RG0L (1198H) TB1RG0H (1199H) TB1RG1L (119AH) TB1RG1H (119BH) bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State bit Symbol Read/Write Reset State 0 0 0 0 0 - 0 - 0 - 0 - W 0 0 0 0 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - W 0 - 0 - 0 - 0 - -
6
-
5
-
4
- W
3
- 0 -
2
- 0 -
1
- 0 -
0
- 0 -
Note: A read-modify-write operation cannot be performed for All registers.
Figure 3.13.8 Register for TMRB
92CF26A-311
2007-11-21
TMP92CF26A 3.13.4 Operation in Each Mode
(1) 16 bit timer mode Generating interrupts at fixed intervals In this example, the interrupt INTTB01 is set to be generated at fixed intervals. The interval time is set in the timer register TB0RG1H/L.
7 TB0RUN INTETB0 TB0FFCR TB0MOD TB0RG1 TB0RUN - X 1 0 * * - 6 0 1 1 0 * * 0 5 X 0 0 1 * * X 4 X 0 0 0 * * X 3 - X 0 0 * * - 2 - 0 0 1 * * 1 1 X 0 1 * * * X 0 0 0 1 * * * 1 Stop TMRB0 Enable INTTB01and set interrupt level 4. Disable INTTB00 Disable the trigger Select internal clock for input and disable the capture function. Set the interval time (16 bits). Start TMRB0.
(** = 01, 10, 11)
X: Don't care, -: No change
(2) 16 bit event counter mode In 16 bit timer mode as described in above, the timer can be used as an event counter by selecting the external clock (TB0IN0 pin input) as the input clock. Up counter (UC10) counts up at the rising edge of TB0IN0 input. To read the value of the counter, first perform "software capture" once and read the captured value.
7 TB0RUN PPCR PPFC INTETB0 TB0FFCR TB0MOD TB0RG1 TB0RUN - X - X 1 0 * * - 6 0 X - 1 1 0 * * 0 5 X - - 0 0 1 * * X 4 X 1 1 0 0 0 * * X 3 - - - X 0 0 * * - 2 - - - 0 0 1 * * 1 1 X - - 0 1 0 * * X 0 0 X X 0 1 0 * * 1 Enable INTTB01 and sets interrupt level 4 Disable INTTB00 Disable trigger Select TB0IN0 as the input clock Set the number of counts (16 bit) Start TMRB0 Stop TMRB0 Set PP4 to input mode for TB0IN0
X: Don't care, -: No change
When used as an event counter, set the prescaler in RUN mode. (TB0RUN = "1")
92CF26A-312
2007-11-21
TMP92CF26A
(3) 16-bit programmable pulse generation (PPG) output mode Square wave pulses can be generated at any frequency and duty ratio. The output pulse may be either low active or high active. The PPG mode is obtained by inversion of the timer flip-flop TB0FF0 that is enabled by the match of the up counter UC10 with timer register TB0RG0H/L or TB0RG1H/L and is output to TB0OUT0. In this mode the following conditions must be satisfied. (Value set in TB0RG0) < (Value set in TB0RG1)
Match with TB0RG0 (INTTB00 interrupt) Match with TB0RG1 (INTTB01 interrupt) TB0OUT0 pin
Figure 3.13.9 Programmable Pulse Generation (PPG) Output Waveforms When the TB0RG0H/L double buffer is enabled in this mode, the value of register buffer 10 will be shifted into TB0RG0H/L at match with TB0RG1H/L. This feature facilitates the handling of low-duty waves.
Match with TB0RG0H/L Up conter = Q1 Match with TB0RG1H/L Shift into TB0RG1H/L TB0RG0H/L (Value to be compared) Register buffer 10 Q1 Q2 Q2 Q3 Write into TB0RG0H/L Up counter = Q2
Figure 3.13.10 Operation of double buffer
Note: The values that can be set in TBxRGx range from 0001h to 0000h (equivalent to 10000h). If the maximum value 000h is set, the match-detect signal goes active when the up-counter overflows.
92CF26A-313
2007-11-21
TMP92CF26A
The following block diagram illustrates this mode.
TB0RUN TB0OUT0 (PPG output) Selector TB0IN0 T1 T4 T16 16-bit up counter UC10 Clear F/F (TB0FF0)
16-bit comparator
Match
16-bit comparator
Selector
TB0RG0H/L
TB0RG0-WR TB0RUN Register buffer 0 TB0RG1H/L
Internal data bus
Figure 3.13.11 Block Diagram of 16-Bit Mode The following example shows how to set 16-bit PPG output mode:
7 TB0RUN TB0RG0 TB0RG1 TB0RUN 0 * * * * 1 6 0 * * * * 0 5 X * * * * X 4 X * * * * X 3 - * * * * - 2 - * * * * 0 1 X * * * * X 0 0 * * * * 0 Disable the TB0RG0 double buffer and stop TMRB0. Set the duty ratio (16 bit) Set the frequency (16 bit) Enable the TB0RG0H/L double buffer. (The duty and frequency are changed on an INTTB01 interrupt.) TB0FFCR X X 0 0 1 1 1 0 Set the mode to invert TB0FF0 at the match with TB0RG0H/L/TB0RG1H/L. Set TB0FF0 to 0. TB0MOD 0 0 1 0 0 1 * * Select the internal clock as the input clock and disable the capture function. Set PP6 to function as TB0OUT0 Start TMRB0.
(** = 01, 10, 11) PPFC TB0RUN - 1 1 0 - X - X - - - 1 - X X 1
X: Don't care, -: No change
92CF26A-314
2007-11-21
TMP92CF26A
(4) Application examples of capture function Used capture function, they can be applied in many ways, for example; 1. 2. 3. 1. One-shot pulse output from external trigger pulse Frequency measurement Pulse width measurement One-shot pulse output from external trigger pulse Set the up counter UC10 in free-running mode with the internal input clock, input the external trigger pulse from TB0IN0 pin, and load the value of up counter into capture register TB0CP0H/L at the rising edge of the TB0IN0 pin. When the interrupt INT6 is generated at the rising edge of TB0IN0 input, set the TB0CP0H/L value (c) plus a delay time (d) to TB0RG0H/L (=c+d), and set the above set value (c+d) plus a one-shot pulse width (p) to TB0RG1H/L (=c+d+p). The TB0FFCR register should be set "11" and that the TB0FF0 inversion is enabled only when the up counter value matches TB0RG0H/L or TB0RG1H/L. When interrupt INTTB01 occurs, this inversion will be disabled after one-shot pulse is output. The (c), (d) and (p) correspond to c, d, and p in the Figure 3.13.12.
Set the counter in free-running mode. Count clock (Prescaler output clock) TB0IN0 pin input (External trigger pulse)
c
c+d
c+d+p
Load to capture registesr 0 (TB0CP0H/L) INT6 occured
Match with TB0RG0H/L Inversion enable Disable inversion caused by loading into TB0CP0H/L Delay time (d) Inversion enable INTTB01 occured
Match with TB0RG1H/L
Timer output pin TB0OUT0
Pulse width (p)
Figure 3.13.12 One-shot Pulse Output (with delay)
92CF26A-315
2007-11-21
TMP92CF26A
Example: To output 2ms one-shot pulse with 3ms delay to the external trigger pulse to TB0IN0pin
*Clock state System clock : Prescaler clock : Main setting Free-running Count with T1 TB0MOD TB0FFCR X X X X 1 0 0 0 1 0 0 0 0 1 1 Load to TB0CP0H/L at the rising edge of TB0IN0 0 Clear TB0FF0 to "0" Disable TB0FF0 inversion PPFC - 1 - - - - - X Select PP6 as TB0OUT0 pin (port setting) fSYS fSYS/4
INTE56 INTETB0 TB0RUN

X X -
1 0 0
0 0 X
0 0 X
X X -
- 0 1
- 0 X
- 0 1
Enable INT6 Disable INTTB00, INTTB01 Start TMRB0
Setting in INT6 routine TB0RG0 TB0RG1 TB0FFCR TB0CP0 + 3ms/T1 TB0RG0 + 2ms/T1 X X - - 1 1 - - Enable TB0FF0 inversion when the up counter value matches TB0RG0H/L or TB0RG1H/L INTETB0 X 1 0 0 X 0 0 0 Enable INTTB01
Setting in INTTB01 routine TB0FFCR X X - - 0 0 - - Disable TB0FF0 inversion when the up counter value matches TB0RG0H/L or TB0RG1H/L INTETB0 X 0 0 0 X 0 0 0 Disable INTTB01
X: Don't care, -: No change
When delay time is unnecessary, invert timer flip-flop TB0FF0 when the up counter value is loaded into capture register (TB0CP0H/L), and set the TB0CP0H/L value (c) plus the one -shot pulse width (p) to TB0RG1H/L when the interrupt INT6 occurs. The TB0FF0 inversion should be enabled when the up counter (UC10) value matched TB0RG1H/L, and disabled when generating the interrupt INTTB01.
92CF26A-316
2007-11-21
TMP92CF26A
Count clock (Prescaler output clock ) c TB0IN0 iput (External trigger pulse)
c+p
Load into capture register 0 (TB0CP0H/L) INT6 occured Load into capture register 1 (TB0CP1H/L)
INTTB01 occured Match with TB0RG1H/L Inversion enable Timer output pin TB0OUT0 Pulse width Enable inversioncaused by loading to TB0CP0H/L (p) Disable inversion caused by loading into TB0CP1H/L
Figure 3.13.13 One-shot Pulse Output (without delay)
2.
Frequency measurement The frequency of the external clock can be measured in this mode. The clock is input through the TB0IN0 pin, and its frequency is measured by the 8 bit timers TMRA01 and the 16 bit timer/event counter (TMRB0). The TB0IN0 pin input should be selected for the input clock of TMRB0. Set to TB0MOD="11". The value of the up counter is loaded into the capture register TB0CP0H/L at the rising edge of the timer flip-flop TA1FF of 8bit timers (TMRA01), and TB0CP1H/L at its falling edge. The frequency is calculated by the difference between the loaded values in TB0CP0H/L and TB0CP1H/L when the interrupt (INTTA0 or INTTA1) is generated by either 8 bit timer.
Count clock (TB0IN0 pin input) TA1FF Loading to TB0CP0H/L Loading to TB0CP1H/L INTTA0/INTTA1
C1
C2
C1 C2
C1 C2
Figure 3.13.14 Frequency Measurement For example, if the value for the level 1 width of TA1FF of the 8 bit timer is set to 0.5[s] and the difference between TB0CP0H/L and TB0CP1H/L is 100, the frequency will be 100/0.5[s] =200[Hz].
Note: The frequency in this examole is calculated with 50% duty.
92CF26A-317
2007-11-21
TMP92CF26A
3. Pulse width measurement This mode allows measuring the H level width of an external pulse. While keeping the 16 bit timer/event counter counting (free-running) with the internal clock input, the external pulse is input through the TB0IN0 pin. Then the capture function is used to load the UC10 values into TB0CP0H/L and TB0CP1H/L at the rising edge and falling edge of the external trigger pulse respectively. The interrupt INT6 occurs at the falling edge of TB0IN0. The pulse width is obtained from the difference between the values of TB0CP0H/L and TB0CP1H/L and the internal clock cycle. For example, if the internal clock is 0.8[us] and the difference between TB0CP0H/L and TB0CP1H/L is 100, the pulse width will be 100 x 0.8[s] =80s Additionally, the pulse width which is over the UC10 maximum count time specified by the clock source can be measured by changing software.
Count clock (Prescaler ouptut clock) TB0IN0 pin input (External pulse) Loading to TB0CP0H/L Loading to TB0CP1H/L INT6
C1
C2
C1 C2
C1 C2
Figure 3.13.15 Pulse Width Measurement
Note: Only in this pulse width measuring mode(TB0MOD "10"), external interrupt INT6 occurs at the falling edge of TB0IN0 pin input. In other modes, it occurs at the rising edge.
The width of L level can be measured by multiplying the difference between the first C1 and the second C0 at the second INT6 interrupt and the internal clock cycle together.
92CF26A-318
2007-11-21
TMP92CF26A
3.14 Serial Channels (SIO)
The TMP92CF26A includes 1 serial I/O channel (SIO0). For channel either UART mode (Asynchronous transmission) or I/O interface mode (Synchronous transmission) can be selected. And, SIO0 includes data modulator that supports the IrDA 1.0 infrared data communication specification. * I/O interface mode Mode 0: For transmitting and receiving I/O data using the synchronizing signal SCLK for extending I/O. 7-bit data 8-bit data 9-bit data
* UART mode
Mode 1: Mode 2: Mode 3:
In mode 1 and mode 2, a parity bit can be added. Mode 3 has a wakeup function for making the master controller start slave controllers via a serial link (A multi-controller system). Figure 3.14.1 is block diagrams for channel. SIO0 is compounded mainly prescaler, serial clock generation circuit, receiving buffer and control circuit, transmission buffer and control circuit.
* Mode 0 (I/O interface mode) Bit0 1 2 3 4 5 6 7
Transfer direction * Mode 1 (7-bit UART mode) No parity Parity * Start Start Bit0 Bit0 1 1 2 2 3 3 4 4 5 5 6 6 Stop Parity Stop
Mode 2 (8-bit UART mode) No parity Parity Start Start Bit0 Bit0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 Stop Parity Stop
*
Mode 3 (9-bit UART mode) Start Wakeup Start Bit0 Bit0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 Bit8 Stop Stop
When bit8 = 1, Address (Select code) is denoted. When bit8 = 0, Data is denoted.
Figure 3.14.1 Data Formats
92CF26A-319
2007-11-21
TMP92CF26A 3.14.1 Block Diagram
Prescaler T0 2 4 8 16 32 64 T2 T8 T32
Serial clock generation circuit BR0CR BR0CR BR0ADD Prescaler T0 T2 T8 T32 Selector TA0TRG (from TMRA0)
Selector
Selector
UART mode
SIOCLK
BR0CR Baud rate generator fIO
SC0MOD0 Selector
SC0MOD0
/2 SCLK0
I/O interface mode
SCLK0
I/O interface mode
SC0CR INT request INTRX0 INTTX0 SC0MOD0 Serial channel interrupt control Transmision counter
Receive counter
(UART only / 16)
(UART only / 16)
RXDCLK SC0MOD0 Receive control SC0CR RXD0 Receive buffer 1 (Shift register) Parity control
TXDCLK Transmission control SC0MOD0
CTS0
RB8
Receive buffer 2 (SC0BUF)
Error flag
TB8
Transmission buffer (SC0BUF)
TXD0
SC0CR Internal data bus
Figure 3.14.2 Block Diagram
92CF26A-320
2007-11-21
TMP92CF26A 3.14.2 Operation of Each Circuit
(1) Prescaler There is a 6-bit prescaler for generating a clock to SIO0. The prescaler can be run by selecting the baud rate generator as the serial transfer clock. Table 3.14.1 shows prescaler clock resolution into the baud rate generator. Table 3.14.1 Prescaler Clock Resolution to Baud Rate Generator Clock gear - SYSCR1
000(1/1) 001(1/2) fc 010(1/4) 011(1/8) 100(1/16) XXX:Don't care 1/4
Baud Rate Generator input clock - T0
fc/4 fc/8 fc/16 fc/32 fc/64
SIO Prescaler BR0CR T2
fc/16 fc/32 fc/64 fc/128 fc/256
T8
fc/64 fc/128 fc/256 fc/512 fc/1024
T32
fc/256 fc/512 fc/1024 fc/2048 fc/4096
The baud rate generator selects between 4-clock inputs: T0, T2, T8, and T32 among the prescaler outputs.
92CF26A-321
2007-11-21
TMP92CF26A
(2) Baud rate generator The baud rate generator is the circuit which generates transmission/receiving clock and determines the transfer rate of the serial channels. The input clock to the baud rate generator, T0, T2, T8 or T32, is generated by the 6-bit prescaler which is shared by the timers. One of these input clocks is selected using the BR0CR field in the baud rate generator control register. The baud rate generator includes a frequency divider, which divides the frequency by 1 or N + (16 - K)/16 to 16 values, thereby determining the transfer rate. The transfer rate is determined by the settings of BR0CR and BR0ADD. In UART mode When BR0CR = 0 The settings BR0ADD are ignored. The baud rate generator divides the selected prescaler clock by N, which is set in BR0CK. (N = 1, 2, 3 ... 16) When BR0CR = 1 The N + (16 - K)/16 division function is enabled. The baud rate generator divides the selected prescaler clock by N + (16 - K)/16 using the value of N set in BR0CR (N = 2, 3 ... 15) and the value of K set in BR0ADD (K = 1, 2, 3 ... 15)
Note: If N = 1 or N = 16, the N + (16 - K)/16 division function is disabled. Clear BR0CR to 0.
In I/O interface mode The N + (16 - K)/16 division function is not available in I/O interface mode. Clear BR0CR to 0 before dividing by N.
The method for calculating the transfer rate when the baud rate generator is used is explained below. * In UART mode Baud rate = Input clock of baud rate generator / 16 Frequency divider for baud rate generator
In I/O interface mode Baud rate = Input clock of baud rate generator /2 Frequency divider for baud rate generator
92CF26A-322
2007-11-21
TMP92CF26A
Integer divider (N divider) For example, when the source clock frequency (fc) is 19.6608 MHz, the input clock is T2, the frequency divider N (BR0CR) = 8, and BR0CR = 0, the baud rate in UART Mode is as follows:
*Clock state Clock gear : 1/1
Baud Rate
= =
Input clock of baud rate generator Frequency divider for baud rate generator fC/16 / 16 8
6
/ 16
= 19.6608 x 10 / 16 / 8 / 16 = 9600 (bps) Note: The N + (16 - K) / 16 division function is disabled and setting BR0ADD is invalid.
N+(16-K)/16 divider (UART Mode only) Accordingly, when the source clock frequency (fc) = 15.9744 MHz, the input clock is T2, the frequency divider N (BR0CR) = 6, K (BR0ADD) = 8, and BR0CR = 1, the baud rate in UART Mode is as follows:
* Clock state Clock gear : 1/1 Input clock of baud rate generator Frequency divider for baud rate generator fC /16 6+ (16 - 8) 16
6
Baud Rate
=
/ 16
=
/ 16 8 16
= 15.9744 x 10 / 16 / (6 +
) / 16 = 9600 (bps)
Table 3.14.2 show examples of UART Mode transfer rates. Additionally, the external clock input is available in the serial clock. (Serial Channel 0). The method for calculating the baud rate is explained below: In UART Mode Baud rate = external clock input frequency / 16 It is necessary to satisfy (external clock input cycle) 4/fSYS In I/O Interface Mode Baud rate = external clock input frequency It is necessary to satisfy (external clock input cycle) 16/fSYS
92CF26A-323
2007-11-21
TMP92CF26A
Table 3.14.2 Transfer Rate Selection (When baud rate generator is used and BR0CR = 0)
fSYS [MHz] 7.3728 9.8304 44.2368 58.9824 73.728 Input Clock Frequency Divider N 1 3 6 A C F 1 2 4 5 8 0 6 9 2 3 5 6 8 C F 1 3 6 A C F T0 (fSYS/4) 115.200 38.400 19.200 11.520 9.600 7.680 153.600 76.800 38.400 30.720 19.200 9.600 115.20 76.800 460.800 307.200 184.320 153.600 115.200 76.800 61.440 1152.000 384.000 192.000 115.200 96.000 76.800 T2 (fSYS/16) 28.800 9.600 4.800 2.880 2.400 1.920 38.400 19.200 9.600 7.680 4.800 2.400 28.800 19.200 115.200 76.800 46.080 38.400 28.800 19.200 15.360 288.000 96.000 48.000 28.800 24.000 19.200 T8 (fSYS/64) 7.200 2.400 1.200 0.720 0.600 0.480 9.600 4.800 2.400 1.920 1.200 0.600 7.200 4.800 28.800 19.200 11.520 9.600 7.200 4.800 3.840 72.000 24.000 12.000 7.200 6.000 4.800
Unit (kbps) T32 (fSYS/256) 1.800 0.600 0.300 0.180 0.150 0.120 2.400 1.200 0.600 0.480 0.300 0.150 1.800 1.200 7.200 4.800 2.880 2.400 1.800 1.200 0.960 18.000 6.000 3.000 1.800 1.500 1.200
Note: Transfer rates in I/O interface mode are eight times faster than the values given above.
In UART mode, TMRA match detect signal (TA0TRG) can be used for serial transfer clock. Method for calculating the timer output frequency which is needed when outputting trigger of timer TA0TRG frequency = Baud rate x 16
Note: The TMRA0 match detect signal cannot be used as the transfer clock in I/O Interface mode.
92CF26A-324
2007-11-21
TMP92CF26A
(3) Serial clock generation circuit This circuit generates the basic clock for transmitting and receiving data. * In I/O Interface Mode In SCLK Output Mode with the setting SC0CR = 0, the basic clock is generated by dividing the output of the baud rate generator by 2, as described previously. In SCLK Input Mode with the setting SC0CR = 1, the rising edge or falling edge will be detected according to the setting of the SC0CR register to generate the basic clock. * In UART Mode The SC0MOD0 setting determines whether the baud rate generator clock, the internal clock fIO, the match detect signal from timer TMRA0 or the external clock (SCLK0) is used to generate the basic clock SIOCLK. (4) Receiving counter The receiving counter is a 4-bit binary counter used in UART Mode, which counts up the pulses of the SIOCLK clock. It takes 16 SIOCLK pulses to receive 1 bit of data; each data bit is sampled three times - on the 7th, 8th and 9th clock cycles. The value of the data bit is determined from these three samples using the majority rule. For example, if the data bit is sampled respectively as 1, 0 and 1 on 7th, 8th and 9th clock cycles, the received data bit is taken to be 1. A data bit sampled as 0, 0 and 1 is taken to be 0. (5) Receiving control * In I/O Interface Mode In SCLK Output Mode with the setting SC0CR = 0, the RXD0 signal is sampled on the rising or falling edge of the shift clock which is output on the SCLK0 pin, according to the SC0CR setting. In SCLK Input Mode with the setting SC0CR = 1, the RXD0 signal is sampled on the rising or falling edge of the SCLK0 input, according to the SC0CR setting * In UART Mode The receiving control block has a circuit, which detects a start bit using the majority rule. Received bits are sampled three times; when two or more out of three samples are 0, the bit is recognized as the start bit and the receiving operation commences. The values of the data bits that are received are also determined using the majority rule.
92CF26A-325
2007-11-21
TMP92CF26A
(6) The Receiving Buffers To prevent Overrun errors, the Receiving Buffers are arranged in a double-buffer structure. Received data is stored one bit at a time in Receiving Buffer 1 (which is a shift register). When 7 or 8 bits of data have been stored in Receiving Buffer 1, the stored data is transferred to Receiving Buffer 2 (SC0BUF); this causes an INTRX0 interrupt to be generated. The CPU only reads Receiving Buffer 2 (SC0BUF). Even before the CPU reads receiving Buffer 2 (SC0BUF), the received data can be stored in Receiving Buffer 1. However, unless Receiving Buffer 2 (SC0BUF) is read before all bits of the next data are received by Receiving Buffer 1, an overrun error occurs. If an Overrun error occurs, the contents of Receiving Buffer 1 will be lost, although the contents of Receiving Buffer 2 and SC0CR will be preserved. SC0CR is used to store either the parity bit - added in 8-Bit UART Mode - or the most significant bit (MSB) - in 9-Bit UART Mode. In 9-Bit UART Mode the wake-up function for the slave controller is enabled by setting SC0MOD0 to 1; in this mode INTRX0 interrupts occur only when the value of SC0CR is 1. SIO interrupt mode is selectable by the register SIMC.
Note1: The double buffer structure does not support SC0CR. Note2: If the CPU reads receive buffer 2 while data is being transferred from receive buffer 1 to receive buffer 2, the data may not be read properly. To avoid this situation, a read of receive buffer 2 should be triggered by a receive interrupt.
(7) Notes for Using Receive Interrupts * Receive interrupts can be detected either in level or edge mode. For details, see the description of the SIO/SEI receive interrupt mode select register SIMC in the section on interrupts. * When receive interrupts are set to level mode, once an interrupt occurs, the same interrupt will occur repeatedly even after control has jumped to the interrupt routine unless interrupts are disabled. (8) Transmission counters The transmission counter is a 4-bit binary counter used in UART Mode and which, like the receiving counter, counts the SIOCLK clock pulses; a TXDCLK pulse is generated every 16 SIOCLK clock pulses.
SIOCLK 15 TXDCLK 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2
Figure 3.14.3 Generation of the transmission clock
92CF26A-326
2007-11-21
TMP92CF26A
(9) Transmission controller * In I/O Interface Mode In SCLK Output Mode with the setting SC0CR = 0, the data in the Transmission Buffer is output one bit at a time to the TXD0 pin on the rising edge or falling of the shift clock which is output on the SCLK0 pin, according to the SC0CR setting. In SCLK Input Mode with the setting SC0CR = 1, the data in the Transmission Buffer is output one bit at a time on the TXD0 pin on the rising or falling edge of the SCLK0 input, according to the SC0CR setting. * In UART Mode When transmission data sent from the CPU is written to the Transmission Buffer, transmission starts on the rising edge of the next TXDCLK.
92CF26A-327
2007-11-21
TMP92CF26A
Handshake function Use of CTS0 pin allows data can to be sent in units of one frame; thus, overrun errors can be avoided. The handshake functions is enabled or disabled by the SC0MOD setting. When the CTS0 pin goes high on completion of the current data send, data transmission is halted until the CTS0 pin goes low again. However, the INTTX0 interrupt is generated, and it requests the next data send to from the CPU. The next data is written in the transmission buffer and data sending is halted. Though there is no RTS pin, a handshake function can be easily configured by setting any port assigned to be the RTS function. The RTS should be output "high" to request send data halt after data receive is completed by software in the RXD interrupt routine.
TMP92CF26A
TMP92CF26A
TXD
CTS0
RXD
RTS (Any port)
Sender
Receiver
Figure 3.14.4 Handshake function
Timing to writing to the transmission buffer
CTS0
Send is suspended (1) from (1) and (2) (2) 13 14 15 16 1 2 3 14 15 16 1 2 3
SIOCLK TXDCLK TXD Start bit bit0
Note 1: If the CTS 0 signal goes High during transmission, no more data will be sent after completion of the current transmission. Note 2: Transmission starts on the first falling edge of the TXDCLK clock after the CTS0 signal has fallen.
Figure 3.14.5 CTS 0 (Clear to send) Timing
92CF26A-328
2007-11-21
TMP92CF26A
(10) Transmission buffer The transmission buffer (SC0BUF) shifts out and sends the transmission data written from the CPU in order from the least significant bit (LSB). When all the bits are shifted out, the transmission buffer becomes empty and generates an INTTX0 interrupt. (11) Parity control circuit When SC0CR in the serial channel control register is set to 1, it is possible to transmit and receive data with parity. However, parity can be added only in 7-bit UART mode or 8-bit UART mode. The SC0CR field in the serial channel control register allows either even or odd parity to be selected. In the case of transmission, parity is automatically generated when data is written to the transmission buffer SC0BUF. The data is transmitted after the parity bit has been stored in SC0BUF in 7-bit UART mode or in SC0MOD0 in 8-bit UART mode. SC0CR and SC0CR must be set before the transmission data is written to the transmission buffer. In the case of receiving, data is shifted into receiving buffer 1, and the parity is added after the data has been transferred to receiving buffer 2 (SC0BUF), and then compared with SC0BUF in 7-bit UART mode or with SC0CR in 8-bit UART mode. If they are not equal, a parity error is generated and the SC0CR flag is set. (12) Error flags Three error flags are provided to increase the reliability of data reception. 1. Overrun error If all the bits of the next data item have been received in receiving buffer 1 while valid data still remains stored in receiving buffer 2 (SC0BUF), an overrun error is generated. The below is a recommended flow when the overrun error is generated. (INTRX interrupt routine) 1) Read receiving buffer 2) Read error flag 3) If = 1 then a) Set to disable receiving (Write 0 to SC0MOD0) b) Wait to terminate current frame c) Read receiving buffer d) Read error flag e) Set to enable receiving (Write 1 to SC0MOD0) f) Request to transmit again 4) Others
Note: Overrun errors are generated only with regard to receive buffer 2 (SC0BUF). Thus, if SC0CR is not read, no overrun error will occur.
92CF26A-329
2007-11-21
TMP92CF26A
2.
Parity error The parity generated for the data shifted into receiving buffer 2 (SC0BUF) is compared with the parity bit received via the RXD pin. If they are not equal, a parity error is generated.
Note: The parity error flag is cleared every time it is read. However, if a parity error is detected wtwice in succession and the parity error flag is read between the two parity errors, it may seem as if the flag had not been cleared. To avoid this situation, a read of the parity error flag should be riggered by a receive interrupt.
3.
Framing error The stop bit for the received data is sampled three times around the center. If the majority of the samples are 0, a Framing error is generated.
(13) Timing generation a. In UART Mode Mode
Interrupt timing Framing error timing Parity error timing Overrun error timing
Receiving 9-Bit (Note)
Center of last bit (bit 8) Center of stop bit Center of last bit (bit 8)
8-Bit + Parity (Note)
Center of last bit (parity bit) Center of stop bit Center of last bit (parity bit) Center of last bit (parity bit)
8-Bit, 7-Bit + Parity, 7-Bit
Center of stop bit Center of stop bit Center of stop bit Center of stop bit
Note1: In 9-Bit and 8-Bit + Parity Modes, interrupts coincide with the ninth bit pulse. Thus, when servicing the interrupt, it is necessary to wait for a 1-bit period (to allow the stop bit to be transferred) to allow checking for a framing error. Note2: The higher the transfer rate, the later than the middle receive interrupts and errors occur.
Transmitting Mode
Interrupt timing
9-Bit
Just before stop bit is transmitted
8-Bit + Parity
Just before stop bit is transmitted
8-Bit, 7-Bit + Parity, 7-Bit
Just before stop bit is transmitted
b.
I/O interface
SCLK Output Mode SCLK Input Mode SCLK Output Mode SCLK Input Mode Immediately after last bit. (See Figure 3.14.13.) Immediately after rise of last SCLK signal Rising Mode, or immediately after fall in Falling Mode. (See Figure 3.14.14.) Timing used to transfer received to data Receive Buffer 2 (SC0BUF) (i.e. immediately after last SCLK). (See Figure 3.14.15.) Timing used to transfer received data to Receive Buffer 2 (SC0BUF) (i.e. immediately after last SCLK). (See Figure 3.14.16.)
Transmission Interrupt timing Receiving Interrupt timing
92CF26A-330
2007-11-21
TMP92CF26A 3.14.3 SFR
7
SC0MOD0 Bit symbol (1202H) Read/Write Reset State Function 0 Transfer data bit 8 0 0: CTS disable 1: CTS enable 0 function 0: Receive disable 1: Receive enable 0 Wake up function 0: disable 1: enable Hand shake Receive TB8
6
CTSE
5
RXE
4
WU R/W
3
SM1 0 Mode
2
SM0 0
1
SC1 0 (UART)
0
SC0 0
Serial Transmission 00: I/O interface Mode 01: 7-bit UART Mode 10: 8-bit UART Mode 11: 9-bit UART Mode
Serial transmission clock 00: TMRA0 trigger 01: Baud rate generator 10: Internal clock fIO 11: External clcok (SCLK0 input)
Serial transmission clock source (UART) 00 01 10 11 TMRA0 match detect signal Baud rate generator Internal clock fIO External clock (SCLK0 input)
Note: The clock selection for the I/O interface mode is controlled by the serial bontrol register (SC0CR). Serial Transmission Mode 00 01 10 11 I/O Interface Mode 7-bit mode UART mode 8-bit mode 9-bit mode
Wake-up function 9-Bit UART Other Modes Interrupt generated 0 whenever data is received Don't care Interrupt generated only 1 when RB8 = 1 Receiving Function 0 1 Receive disabled Receive enabled
Handshake function (/CTS pin) 0 1 Disabled (always transferable) Enabled
Transmission data bit 8
Figure 3.14.6 Serial Mode Control Register (channel 0, SC0MOD0)
92CF26A-331
2007-11-21
TMP92CF26A
7
SC0CR (1201H) A read -modify-write operation cannot be performed bit Symbol Read/Write Reset State Function RB8 R Undefined Received data bit 8
6
EVEN R/W 0 Parity 0: odd 1: even
5
PE 0 Parity addition 0: disable 1: enable
4
OERR 0
3
PERR 0 1: error
2
FERR 0
1
SCLKS R/W 0 0: SCLK0
0
IOC 0 0: baud rate generator 1: SCLK0
R (cleared to 0 when read)
Overrun
Parity
Framing
1: SCLK0
pin input
I/O interface input clock selection 0 1 Baud rate generator SCLK0 pin input
Edge selection for SCLK pin (Input / Output Mode) 0 1 Transmits and receives data on rising edge of SCLK0. Transmits and receives data on falling edge SCLK0.
Framing Error flag Parity Error flag Overrun Error flag Parity addition enables 0 1 Disabled Enabled
Cleared to 0 when read
Even parity addition/check 0 1 Odd parity Even parity
Received data 8
Note: As all error flags are cleared after reading, do not test only a single bit with a bit-testing instruction.
Figure 3.14.7 Serial Control Register (channel 0, SC0CR)
92CF26A-332
2007-11-21
TMP92CF26A
7
BR0CR (1203H) Bit symbol Read/Write Reset State Function 0 Always write "0" -
6
BR0ADDE 0 division 0: Disable 1: Enable
5
BR0CK1 0 01: T2 10: T8 11: T32
4
BR0CK0 R/W 0
3
BR0S3 0
2
BR0S2 0
1
BR0S1 0
0
BR0S0 0
+(16-K)/16 00: T0
Divided frequency setting
+(16-K)/16 division enable 0 1 Disable Enable
Setting the input clock of baud rate generator 00 01 10 11 Internal clock T0 Internal clock T2 Internal clock T8 Internal clock T32
7
BR0ADD bit Symbol (1204H) Read/Write Reset State Function
6
5
4
3
BR0K3 0
2
BR0K2 R/W 0
1
BR0K1 0
0
BR0K0 0
Sets frequency divisor "K" (divided by N + (16-K) / 16)
Sets baud rate generator frequency divisor BR0CR = 1 BR0CR BR0ADD 0000 0001(K = 1) to 1111(K = 15) Disable Disable Disable Divided by N + (16-K) /16 Divided by N 0000(N = 16) or 0001 (N = 1) 0010 (N = 2) to 1111 (N = 15) BR0CR = 0 0001 (N = 1) (UART only) to 1111(N = 15) 0000(N = 16)
Note1:Availability of +(16-K)/16 division function
N
2 to 15
UART mode
I/O mode
x
x x 1 , 16 The baud rate generator can be set to "1" in UART mode only when the +(16-K)/16 division function is not used.Do not use in I/O interface mode. Note2:Set BR0CR to 1 after setting K (K = 1 to 15) to BR0ADD when +(16-K)/16 division function is used. If the unused bits in the BR0ADD register is written, it does not iaffect o operation. If that bits is read, it becomes undefined.
Figure 3.14.8 Baud rate generator control (channel 0, BR0CR, BR0ADD)
92CF26A-333
2007-11-21
TMP92CF26A
7
TB7 SC0BUF (1200H)
6
TB6
5
TB5
4
TB4
3
TB3
2
TB2
1
TB1
0
TB0 (Transmission)
7
RB7
6
RB6
5
RB5
4
RB4
3
RB3
2
RB2
1
RB1
0
RB0 (Receiving)
Note: Prohibit read-modify-write for SC0BUF.
Figure 3.14.9 Serial Transmission/Receiving Buffer Registers (channel 0, SC0BUF)
7
SC0MOD1 Bit symbol (1205H) Read/Write Reset State Function I2S0 R/W 0 IDLE2 0: Stop 1: Run
6
FDPX0 R/W 0 duplex 0: half 1: full
5
4
3
2
1
0
Figure 3.14.10 Serial Mode Control Register 1 (channel 0, SC0MOD1)
92CF26A-334
2007-11-21
TMP92CF26A 3.14.4 Operation in each mode
(1) Mode 0 (I/O Interface Mode) This mode allows an increase in the number of I/O pins available for transmitting data to or receiving data from an external shift register. This mode includes the SCLK output mode to output synchronous clock SCLK and SCLK input mode to input external synchronous clock SCLK.
Output extension TMP92CF26A TXD SCLK Port Shift register SI SCK RCK A B C D E F G H
Input extension TMP92CF26A RXD SCLK Port Shift register QH CLOCK S/ L A B C D E F G H
TC74HC595 or equivalent
TC74HC165 or equivalent
Figure 3.14.11 SCLK Output Mode connection example
Output extension TMP92CF26A Shift register A B TXD SCLK Port SI SCK RCK C D E F G H Port S/ L SCLK CLOCK RXD QH Input extension TMP92CF26A Shift register A B C D E F G H
TC74HC595 or equivalent External clock
TC74HC165 or equivalent External clock
Figure 3.14.12 Example of SCLK Input Mode Connection
92CF26A-335
2007-11-21
TMP92CF26A
a.
Transmission In SCLK output mode 8-bit data and a synchronous clock are output on the TXD0 and SCLK0 pins respectively each time the CPU writes the data to the Transmission Buffer. When all data is output, INTES0 will be set to generate the INTTX0 interrupt.
Timing of transmited data writing SCLK0 output ( = 0: rising edge mode) SCLK0 output ( = 1: falling edge mode) TXD0 ITX0C (INTTX0 interrupt request) Bit0 Bit1 Bit6 Bit7
(Internal clock timing)
Figure 3.14.13 Transmitting Operation in I/O Interface Mode (SCLK0 Output Mode) In SCLK Input Mode, 8-bit data is output on the TXD0 pin when the SCLK0 input becomes active after the data has been written to the Transmission Buffer by the CPU. When all data is output, INTES0 will be set to generate INTTX0 interrupt.
SCLK0 input ( = 0: rising edge mode) SCLK0 input ( = 1: falling edge mode) TXD0 ITX0C (INTTX0 intterrupt reqest) Bit0 Bit1 Bit5 Bit6 Bit7
Figure 3.14.14 Transmitting Operation in I/O Interface Mode (SCLK0 Input Mode)
92CF26A-336
2007-11-21
TMP92CF26A
b.
Receiving In SCLK Output Mode the synchronous clock is output on the SCLK0 pin and the data is shifted to Receiving Buffer 1. This is initiated when the Receive Interrupt flag INTES0 is cleared as the received data is read. When 8-bit data is received, the data is transferred to Receiving Buffer 2 (SC0BUF) following the timing shown below and INTES0 is set to 1 again, causing an INTRX0 interrupt to be generated. Setting SC0MOD0 to 1 initiates SCLK0 output.
IRX0C (INTRX0 interrupt request) SCLK0 output ( = 0: rising edge mode) SCLK0 output ( = 1: falling edge mode) RXD0 Bit0 Bit1 Bit6 Bit7
Figure 3.14.15 Receiving operation in I/O Interface Mode (SCLK0 Output Mode)
In SCLK Input Mode the data is shifted to Receiving Buffer 1 when the SCLK input goes active. The SCLK input goes active when the Receive Interrupt flag INTES0 is cleared as the received data is read. When 8-bit data is received, the data is shifted to Receiving Buffer 2 (SC0BUF) following the timing shown below and INTES0 is set to 1 again, causing an INTRX0 interrupt to be generated.
SCLK0 input ( = 0: rising edge mode) SCLK0 input ( = 1: falling edge mode) RXD1 IRX0C (INTRX0 interrupt request)
Bit
Bit1
Bit5
Bit6
Bit7
Figure 3.14.16 Receiving Operation in I/O interface Mode (SCLK0 Input Mode)
Note: The system must be put in the receive-enable state (SC0MOD0 = 1) before data can be received.
92CF26A-337
2007-11-21
TMP92CF26A
c.
Transmission and Receiving (Full Duplex Mode) When Full Duplex Mode is used, set the Receive Interrupt Level to 0, and only set the interrupt level (from 1 to 6) of the transmit interrupt. Ensure that the program which transmits the interrupt reads the receiving buffer before setting the next transmit data. The following is an example of this:
Example: Channel 0, SCLK output Baud rate = 9600 bps fSYS = 2.4576 MHz
Main routine
7 INTES0 P9CR P9FC SC0MOD0 SC0MOD1 SC0CR BR0CR SC0MOD0 SC0BUF ACC SC0BUF X X - - - - 0 - * 6 0 X - - 1 - 0 - * 5 0 X X - X - 0 1 * 4 1 X X - X - 1 - * 3 X X X 0 X - 1 - * 2 0 1 1 0 X - 0 - * 1 0 0 X - X 0 0 - * 0 0 1 1 - X 0 0 - * Set the INTTX0 level to 1. Set the INTRX0 level to 0. Set P90, P91 and P92 to function as the TXD0, RXD0 and SCLK0 pins respectively. Select I/O interface mode. Select full duplex mode. SCLK0 output mode, select rising edge Baud rate = 9600 bps. Enable receiving. Set the transmit data and start. Read the receiving buffer. * * * * * Set the next transmit data.
INTTX0 interrupt routine
SC0BUF * * *
X: Don't care, -: No change
92CF26A-338
2007-11-21
TMP92CF26A
(2) Mode 1 (7-bit UART Mode) 7-Bit UART Mode is selected by setting the Serial Channel Mode Register SC0MOD0 field to 01. In this mode a parity bit can be added. Use of a parity bit is enabled or disabled by the setting of the Serial Channel Control Register SC0CR bit; whether even parity or odd parity will be used is determined by the SC0CR setting when SC0CR is set to 1 (enabled).
Setting example: When transmitting data of the following format, the control registers should be set as described below. Start Bit0 1 2 3 4 5 6
Even parity
Transmission direction (Transmission rate: 2400 bps at fSYS = 19.6608 MHz) 7 P9CR P9FC SC0MOD0 SC0CR BR0CR INTES0 SC0BUF X - X - 0 6 X - 0 1 0 5 X X - 1 1 4 X X X - 0 3 X X 0 - 1 X * 2 - - 1 - 0 0 * 1 - X 0 - 0 0 * 0 1 1 1 - 0 0 * Set P90 to function as the TXD0 pin. Select 7-bit UART mode. Add even parity. Set the transfer rate to 2400 bps. Enable the INTTX0 interrupt and set it to interrupt level 4. Set data for transmission.
X 1 0 0 * * * * X: Don't care, -: No change
(3) Mode 2 (8-Bit UART Mode) 8-Bit UART Mode is selected by setting SC0MOD0 to 10. In this mode a parity bit can be added (use of a parity bit is enabled or disabled by the setting of SC0CR); whether even parity or odd parity will be used is determined by the SC0CR setting when SC0CR is set to 1 (enabled).
Setting example:
When receiving data of the following format, the control registers should be set as described below
Odd parity
Start
Bit0
1
2
3
4
5
6
7
Stop
Transmission direction (Transmission rate: 9600 bps at fSYS = 19.6608 MHz)
92CF26A-339
2007-11-21
TMP92CF26A
Main routine 7 P9CR P9FC SC0MOD0 SC0CR BR0CR INTES0 X - - - 0 X 6 X - - 0 0 1 5 X X 1 1 0 0 4 X X - - 1 0 3 X X 1 - 1 X 2 - - 0 - 0 0 1 0 X 0 - 0 0 0 - - 1 - 0 0 Set P91 to function as the RXD0 pin. Enable receiving in 8-bit UART mode. Add odd parity. Set the transfer rate to 9600 bps. Enable the INTTX0 interrupt and set it to interrupt level 4. Interrupt routine ACC ACC SC0CR AND 00011100 SC0BUF if ACC 0 then ERROR X: Don't care, -: No change Check for errors Read the received data
(4) Mode 3 (9-Bit UART Mode) 9-Bit UART Mode is selected by setting SC0MOD0 to 11. In this mode a parity bit cannot be added. In the case of transmission the MSB (9th bit) is written to SC0MOD0. In the case of receiving it is stored in SC0CR. When the buffer is written or read, or is read or written first, before the rest of the SC0BUF data. Wake-up function In 9-Bit UART Mode, the wake-up function for slave controllers is enabled by setting SC0MOD0 to 1. The interrupt INTRX0 can only be generated when = 1.
TXD Master
RXD
TXD Slave1
RXD
TXD Slave 2
RXD
TXD
RXD Slave 3
Note: The TXD pin of each slave controller must be in Open-Drain Output Mode.
Figure 3.14.17 Serial Link using Wake-up function
92CF26A-340
2007-11-21
TMP92CF26A
Protocol 1. 2. 3. Select 9-Bit UART Mode on the master and slave controllers. Set the SC0MOD0 bit on each slave controller to 1 to enable data receiving. The master controller transmits data one frame at a time. Each frame includes an 8-bit select code which identifies a slave controller. The MSB (bit 8) of the data () is set to 1.
Start Bit0 1 2 3 4 5 6 7 8 "1" Stop
Select code of slave controller
4.
Each slave controller receives the above frame. Each controller checks the above select code against its own select code. The controller whose code matches clears its bit to 0. The master controller transmits data to the specified slave controller (the controller whose SC0MOD0 bit has been cleared to 0). The MSB (bit 8) of the data () is cleared to 0.
Start Bit0 1 2 3 Data 4 5 6 7 Bit8 "0" Stop
5.
6.
The other slave controllers (whose bits remain at 1) ignore the received data because their MSBs (bit 8 or ) are set to 0, disabling INTRX0 interrupts. The slave controller whose bit = 0 can also transmit to the master controller. In this way it can signal the master controller that the data transmission from the master controller has been completed.
92CF26A-341
2007-11-21
TMP92CF26A
Setting example: To link two slave controllers serially with the master controller using the internal clock fIO as the transfer clock.
TXD
RXD
TXD
RXD
TXD
RXD
Master
Slave1
Slave 2
Setting the master controller
Main routine P9CR P9FC INTES0
Select code 00000001
Select code 00001010
X X XX X - 0 1 - - XX X - X 1 X100 X101
Set P90 and P91 to function as the TXD0 and RXD0 pins respectively. Enable the INTTX0 interrupt and set it to Interrupt Level 4. Enable the INTRX0 interrupt and set it to Interrupt Level 5. Set fIO as the transmission clock for 9-Bit UART Mode. Set the select code for slave controller 1.
SC0MOD0 1 0 1 0 1 1 1 0 SC0BUF 0000 0001 Interrupt routine (INTTX0) SC0MOD0 0 - - - - - - - SC0BUF **** ****
Set TB8 to 0. Set data for transmission.
Setting the slave controller
Main routine P9CR P9FC P9FC2 INTES0 XXXXX-01 --XXX-X1 XXXXXXX1 Select P91 and P90 to function as the RXD0 and TXD0 pins respectively (open-drain output). Enable INTRX0 and INTTX0. Set to 1 in 9-Bit UART Transmission Mode using fIO as the transfer clock. Interrupt routine (INTRX0) Acc SC0BUF if Acc =Select code Then SC0MOD0 - - - 0 - - - - Clear to 0.
X100X100 SC0MOD0 0 0 1 1 1 1 1 0
92CF26A-342
2007-11-21
TMP92CF26A 3.14.5 Support for IrDA
SIO0 includes support for the IrDA 1.0 infrared data communication specification. Figure 3.14.8 shows the block diagram.
Transmission data
TXD0 IR modulator Modem RXD0 IR transmitter & LED IR output
SIO0 Receive data
IR demodulator
IR receiver
IR input
TMP92CF26A
Figure 3.14.18 Block Diagram (1) Modulation of the transmission data When the transmit data is 0, the modem outputs 1 to TXD0 pin with either 3/16 or 1/16 times for width of baud-rate. The pulse width is selected by the SIRCR. When the transmit data is 1, the modem outputs 0.
Transmission data TXD0 pin
Start
0
1
0
0
1
1
0
0
Stop
Figure 3.14.19 Transmission example (2) Modulation of the receive data When the receive data has an effective pulse width of pulse "1", the modem outputs "0" to SIO0. Otherwise the modem outputs "1" to SIO0. The effective pulse width is selected by SIRCR.
RXD0 pin
Receive data
Start
1
0
0
1
0
1
1
0
Stop
Figure 3.14.20 Receiving example
92CF26A-343
2007-11-21
TMP92CF26A
(3) Data format The data format is fixed as follows: Data length: 8-bit Parity bits: Stop bits: (4) SFR Figure 3.14.21 shows the control register SIRCR. Set SIRCR data while SIO0 is stopped. The following example describes how to set this register:
1) SIO setting 2) LD (SIRCR), 07H 3) LD (SIRCR), 37H 4) Start transmission and receiving for SIO0 ; Set the SIO to UART Mode. ; Set the receive data pulse width to 16x. ; TXEN, RXEN Enable the Transmission and receiving. ; The modem operates as follows: SIO0 starts transmitting. IR receiver starts receiving.
none 1bit
92CF26A-344
2007-11-21
TMP92CF26A
(5) Notes 1. Baud rate for IrDA When IrDA is operated, set 01 to SC0MOD0 to generate baud-rate. Setting other than the above (TA0TRG, fIO and SCLK0-input) cannot be used. 2. The pulse width for transmission The IrDA 1.0 specification is defined in Table 3.14.3.
Table 3.14.3 Baud rate and pulse width specifications Baud Rate Modulation
2.4 kbps 9.6 kbps 19.2 kbps 38.4 kbps 57.6 kbps 115.2 kbps RZI RZI RZI RZI RZI RZI
Rate Tolerance (% of rate)
0.87 0.87 0.87 0.87 0.87 0.87
Pulse Width Pulse Width Pulse width (minimum) (typical) (maximum)
1.41 s 1.41 s 1.41 s 1.41 s 1.41 s 1.41 s 78.13 s 19.53 s 9.77 s 4.88 s 3.26 s 1.63 s 88.55 s 22.13 s 11.07 s 5.96 s 4.34 s 2.23 s
The infra-red pulse width is specified either baud rate Tx 3/16 or 1.6 s (1.6 s is equal to 3/16 pulse width when baud rate is 115.2 kbps). The TMP92CF26A has a function which can select the pulse width of Transmission as either 3/16 or 1/16. However, 1/16 pulse width can only be selected when the baud rate is equal to or less than 38.4 kbps. For the same reason, the + (16 - k)/16 division function in the baud rate generator of SIO0 cannot be used to generate a 115.2 kbps baud rate. The + (16-K)/16 division function cannot be used also when the baud rate is 38.4 kbps and the pulse width is 1/16.
Table 3.14.4 Baud rate and pulse width for (16 - K) / 16 division function Pulse Width
115.2 Kbps T x 3/16 T x 1/16 x (Note) - 57.6 Kbps
Baud Rate
38.4 Kbps 19.2 Kbps 9.6 Kbps 2.4 Kbps
-
x



: (16 - K)/16 division function can be used. x: (16 - K)/16 division function cannot be used. -: Cannot be set to 1/16 pulse width Note: (16 - K)/16 division function can be used under special conditions.
92CF26A-345
2007-11-21
TMP92CF26A
7
SIRCR Bit symbol Reset State Function PLSEL 0 Select transmit pulse width 0: 3/16 1: 1/16 data (1207H) Read/Write
6
RXSEL 0 Receive
0: "H" pulse 1: "L" pulse
5
TXEN 0 Transmit 0: disable 1: enable
4
RXEN 0 Receive 0: disable 1: enable R/W
3
SIRWD3 0
2
SIRWD2 0
1
SIRWD1 0
0
SIRWD0 0
Select receive pulse width Set effective pulse width to equal to more than 2x x (value + 1) + 100ns Can be set : 1 to 14 Can not be set : 0, 15
Select receive pulse width Formula: Effective pulse width 2x x (value + 1) + 100ns x = 1/fFPH 0000 0001 to 1110 1111 0 1 0 1 0 1 Equal or more than 30x + 100ns Can not be set Disable receiving operation (Received data is ignored) Enabled receiving operation Disabled transmission operation (Input from SIO is ignored) Enabled transmission operation 3/16 pulse width 1/16 pulse width Select transmit pulse width Transmit (modulation) operation Cannot be set Equal or more than 4x + 100ns
Receive (recovery) operation
Figure 3.14.21 IrDA Control Register
92CF26A-346
2007-11-21
TMP92CF26A
3.15 Serial Bus Interface (SBI)
The TMP92CF26A has a 1-channel serial bus interface which an I2C bus mode. This circuit supports only I2C bus mode (Multi master). The serial bus interface is connected to an external device through PV6 (SDA) and PV7 (SCL) in the I2C bus mode. Each pin is specified as follows.
PVFC2
I C bus mode
2
PVCR
11
PVFC
11
11
3.15.1
Configuration
INTSBI interrupt request SCL SCK SIO clock control Input/ output control fSYS/4 Divider Transfer control circuit SIO data control SO SI
PV6 (SDA)
Noise canceller
I C bus clock sync. + control
2
Shift register
I C bus data control
2
PV7 (SCL) Noise canceller SDA
SBICR2/ SBISR SBI control register 2/ SBI status register
I2CAR I C bus address register
2
SBIDBR SBI data buffer register
SBICR0, 1 SBI control register 0, 1
SBIBR0 SBI baud rate register 0
Figure 3.15.1 Serial bus interface (SBI)
92CF26A-347
2007-11-21
TMP92CF26A 3.15.2 Serial Bus Interface (SBI) Control
The following registers are used to control the serial bus interface and monitor the operation status. * Serial bus interface control register 0 (SBICR0) * Serial bus interface control register 1 (SBICR1) * Serial bus interface control register 2 (SBICR2) * Serial bus interface data buffer register (SBIDBR) * I2C bus address register (I2CAR) * Serial bus interface status register (SBISR) * Serial bus interface baud rate register 0 (SBIBR0)
3.15.3
The Data Formats in the I C Bus Mode
The data formats in the I2C bus mode is shown below.
2
(a) Addressing format
8 bits S Slave address 1 1 RA /C WK 1 to 8 bits Data 1 A C K 1 or more 1 to 8 bits Data 1 A CP K
(b) Addressing format (with restart)
8 bits S Slave address 1 1 RA /C WK 1 to 8 bits Data 1 or more 1 A CS K 8 bits Slave address 1 1 RA /C WK 1 to 8 bits Data 1 or more 1 A CP K
(c) Free data format (data transferred from master device to slave device)
8 bits S Data 1 S: Start condition R/ W : ACK: Direction bit Acknowledge bit 1 A C K 1 to 8 bits Data 1 A C K 1 or more 1 to 8 bits Data 1 A CP K
P: Stop condition
Figure 3.15.2 Data format in the I2C bus mode
92CF26A-348
2007-11-21
TMP92CF26A 3.15.4 I C Bus Mode Control Register
The following registers are used to control and monitor the operation status when using the serial bus interface (SBI) in the I2C bus mode.
2
Serial Bus Interface Control Register 0 7
SBICR0 (1247H) A readmodify-write operation cannot be performed : When using SBI, should be set "1" (SBI operation enable) before setting each register of SBI module. Bit symbol Read/Write Reset State Function SBI operation 0 : disable 1 : enable SBIEN R/W 0 0 0 0
6
-
5
-
4
-
3
-
2
-
1
-
0
-
R 0 Always read "0". 0 0 0
Figure 3.15.3 Registers for the I2C bus mode
92CF26A-349
2007-11-21
TMP92CF26A
Serial Bus Interface Control Register 1 7
SBICR1 (1240H) A readRead/Write 0 R/W 0 (Note 1) 0
mode specification 0: Not generate 1:Generate
6
BC1
5
BC0
4
ACK R/W 0
3
-
2
SCK2 R/W 0
1
SCK1
0
SCK0/ SWRMON
Bit symbol
BC2
R 1 read as "1".
R/W 0 0/1(Note2)
modify-write Reset State Function operation cannot be performed
Number of transferred bits
Acknowledge Always
Internal serial clock selection and software reset monitor
Internal serial clock selection at write fSYS=80MHz (Output to SCL pin), Clock gear = fc/1 - 000 n=4 - 001 n=5 System Clock: fSYS - 010 n=6 (=80MHz) - 011 n=7 Clock Gear : fc/1 68 kHz 100 n=8 36 kHz 101 n=9 fscl = fSYS/4 [Hz] n 2 + 36 19 kHz 110 n = 10 111 (Reserved) (Reserved) Software reset state monitor at read 0 1 0 1 During software reset (Initial Data) Not generate clock pulse for acknowledge signal Generate clock pulse for acknowledge signal
Acknowledge mode specification
Number of bits transferred = 0 000 001 010 011 100 101 110 111 Number of clock pulses 8 1 2 3 4 5 6 7 Bits 8 1 2 3 4 5 6 7 = 1 Number of clock pulses 9 2 3 4 5 6 7 8 Bits 8 1 2 3 4 5 6 7
Note1: For the frequency of the SCL line clock, see 3.15.5 (3) Serial clock. Note2: The initial data of SCK0 is "0", the initialdata of SWRMON is "1" if SBI operation is enable (SBICR0 = "1"). If SBI operation is disable (SBICR0 = "0"), the initialdata of SWRMON is "0". Note3: This I C bus circuit does not support Fast-mode, it supports the Standard mode only. Although the I C bus circuit itself allows the setting of a baud rate over 100kbps, the compliance with the I C specification is not guaranteed in that case.
2 2 2
Figure 3.15.4 Registers for the I2C bus mode
92CF26A-350
2007-11-21
TMP92CF26A
Serial Bus Interface Control Register 2 7
SBICR2 (1243H) A readBit symbol Read/Write Reset State 0 selection 0:Slave 1:Master 0 /Receiver selection
0:Receiver 1:Transmitter
6
TRX W
5
BB 0 condition
4
PIN 1 Cancel INTSBI
3
SBIM1 0 W (Note 1)
2
SBIM0 0
1
SWRST1 0 W (Note 1)
0
SWRST0 0
MST
modify-write Function operation cannot be performed
Master/Slave Transmitter Start/Stop
Serial bus interface
Software reset generate
Generation interrupt 0:Generate request stop
operating mode selection write "10" and "01", then an internal reset signal is (Note 2) 00: Port mode generated.
0:Don't care 01: Reserved 2 condition 1:Cancel 10: I C Bus mode 1:Generate start condition interrupt request 11: Reserved
Serial bus interface operating mode selection (Note2) 00 01 10 11 Port Mode (Serial Bus Interface output disabled) Reserved I C Bus Mode Reserved
2
Note 1: Reading this register functions as SBISR register. Note 2: Switch a mode to port mode after confirming that the bus is free. Switch a mode between I C bus mode and port mode after confirming that input signals via port are high-level.
2
Figure 3.15.5 Registers for the I2C bus mode
Table 3.15.1Resolution of base clock
@fSYS = 80MHz
Clock Gear
000(fc)
Base Clock Resolution
fSYS/2 (50ns) fSYS/2 (0.1s) fSYS/2 (0.2s)
5 4 3 2
001(fc/2)
010(fc/4)
011(fc/8)
fSYS/2 (0.4s)
6
100(fc/16)
fSYS/2 (0.8s)
92CF26A-351
2007-11-21
TMP92CF26A
Serial Bus Interface Status Register 7
SBISR (1243H) A readmodify-write operation cannot be performed Bit symbol Read/Write Reset State Function
status monitor 0:Slave 1:Master
6
TRX 0
Receiver status monitor 0:Receiver 1:Tranmitter
5
BB 0
monitor 0:Free 1:Busy
4
PIN R 1
interrupt request monitor 0: Interrupt requested 1: Interrupt canceled
3
AL 0
Arbitration monitor 0: - 1: Detected Slave
2
AAS 0
CALL
1
AD0 0
GENERAL detection monitor Last
0
LRB 0
received bit monitor 0: 0
MST 0
Master/ Slave Transmitter/
I2C bus status INTSBI
lost detection address match detection monitor 1: Detected
0:Undetected 1: 1
0:Undetected 1: Detected
Last received bit monitor 0 1 0 1 0 1 Last received bit was 0 Last received bit was 1 Undetected GENERAL CALL detected
Slave address don't match or Undetected Slave address match or GENERAL CALL detected
GENERAL CALL detection monitor
Slave address match detection monitor
Arbitration lost detection monitor 0 1 - Arbitration lost
Note1: Writing in this register functions as SBICR2. Note2: The initialdata SBISR is "1" if SBI operation is enable (SBICR0="1"). If SBI operation is disable (SBICR0="0"), the initialdata of SBISR is "0".
Figure 3.15.6 Registers for the I2C bus mode
92CF26A-352
2007-11-21
TMP92CF26A
Serial Bus Interface Baud Rate Register 0 7
SBIBR0 (1244H) A readmodify-write operation cannot be performed Operation during IDLE 2 mode 0 1 Stop Operation Bit symbol Read/Write Reset State Function - W 0 Always read "0"
6
I2SBI R/W 0 IDLE2 0: Stop 1: Run
5
-
4
-
3
-
2
-
1
-
0
-
R 1 1 1 Always read as "1" 1 1
R/W 0 Always write "0".
Serial Bus Interface Data Buffer Register 7
SBIDBR (1241H) A readmodify-write operation cannot be performed Note1: When writing transmitted data, start from the MSB (bit 7).Receiving data is placed from LSB(bit0). Note2: SBIDBR can't be read the written data because of it has buffer for writing and buffer for reading individually.Therefore Read modify write instruction (e.g."BIT" instruction ) is prohibitted. Undefined Bit symbol Read/Write Reset State DB7
6
DB6
5
DB5
4
DB4
3
DB3
2
DB2
1
DB1
0
DB0
R (received)/W (transfer)
I2C Bus Address Register 7
I2CAR (1242H) A readmodify-write operation cannot be performed Bit symbol Read/Write Reset State Function 0 0 0 0 SA6
6
SA5
5
SA4
4
SA3 R/W
3
SA2 0
2
SA1 0
1
SA0 0
0
ALS 0
Address recognition mode specification
Slave address selection for when device is operating as slave device
Address recognition mode specification 0 1 Slave address recognition Non slave address recognition
Figure 3.15.7 Registers for the I2C bus mode
92CF26A-353
2007-11-21
TMP92CF26A 3.15.5 Control in I C Bus Mode
(1) Acknowledge Mode Specification When slave address is matched or detecting GENERAL CALL, and set the SBICR1 to "1", TMP92CF26A operates in the acknowledge mode. The TMP92CF26A generates an additional clock pulse for an Acknowledge signal when operating in Master Mode. In the transmitter mode during the clock pulse cycle, the SDA pin is released in order to receive the acknowledge signal from the receiver. In the receiver mode during the clock pulse cycle, the SDA pin is set to the Low in order to generate the acknowledge signal. Clear the to "0" for operation in the Non-Acknowledge Mode; The TMP92CF26A does not generate a clock pulse for the Acknowledge signal when operating in the Master Mode. (2) Number of transfer bits The SBICR1 is used to select a number of bits for next transmitting and receiving data. Since the is cleared to 000 as a start condition, a slave address and direction bit transmission are executed in 8 bits. Other than these, the retains a specified value. (3) a. Serial clock Clock source The SBICR1 is used to select a maximum transfer frequency outputted on the SCL pin in Master Mode. Set a communication baud rates that meets the I2C bus specification, such as the shortest pulse width of tLOW, based on the equations shown below.
tHIGH tLOW 1/fscl 2
tLOW = (2 + 29)/(fSYS/4)
n-1
tHIGH = (2
n-1
+ 6)/(fSYS/4)
fscl = 1/(tLOW + tHIGH) = fSYS/4 2 + 36
n
SBICR1 000 001 010 011 100 101 110
n 4 5 6 7 8 9 10
Figure 3.15.8 Clock source
92CF26A-354
2007-11-21
TMP92CF26A
b. Clock synchronization In the I2C bus mode, in order to wired-AND a bus, a master device which pulls down a clock line to low-level, in the first place, invalidate a clock pulse of another master device which generates a high-level clock pulse. The master device with a high-level clock pulse needs to detect the situation and implement the following procedure. The TMP92CF26A has a clock synchronization function for normal data transfer even when more than one master exists on the bus. The example explains the clock synchronization procedures when two masters simultaneously exist on a bus.
Wait counting high-level width of a clock pulse Start counting high-level width of a clock pulse Internal SCL output (Master A) Internal SCL output (Master B) SCL pin a b c Reset a counting of high-level width of a clock pulse
Figure 3.15.9 Clock synchronization
As Master A pulls down the internal SCL output to the Low level at point "a", the SCL line of the bus becomes the Low-level. After detecting this situation, Master B resets a counter of High-level width of an own clock pulse and sets the internal SCL output to the Low-level. Master A finishes counting Low-level width of an own clock pulse at point "b" and sets the internal SCL output to the High-level. Since Master B holds the SCL line of the bus at the Low-level, Master A wait for counting high-level width of an own clock pulse. After Master B finishes counting low-level width of an own clock pulse at point "c" and Master A detects the SCL line of the bus at the High-level, and starts counting High-level of an own clock pulse. The clock pulse on the bus is determined by the master device with the shortest High-level width and the master device with the longest Low-level width from among those master devices connected to the bus. (4) Slave address and address recognition mode specification When the TMP92CF26A is used as a slave device, set the slave address and to the I2CAR. Clear the to "0" for the address recognition mode. (5) Master/Slave selection Set the SBICR2 to "1" for operating the TMP92CF26A as a master device. Clear the SBICR2 to "0" for operation as a slave device. The is cleared to "0" by the hardware after a stop condition on the bus is detected or arbitration is lost.
92CF26A-355
2007-11-21
TMP92CF26A
(6) Transmitter/Receiver selection Set the SBICR2 to "1" for operating the TMP92CF26A as a transmitter. Clear the to "0" for operation as a receiver. In Slave Mode, * Data with an addressing format is transferred * A slave address with the same value that an I2CAR * A GENERAL CALL is received (all 8-bit data are "0" after a start condition) The is set to "1" by the hardware if the direction bit (R/ W ) sent from the master device is "1", and is cleared to "0" by the hardware if the bit is "0". In the Master Mode, after an Acknowledge signal is returned from the slave device, the is cleared to "0" by the hardware if a transmitted direction bit is "1", and is set to "1" by the hardware if it is "0". When an Acknowledge signal is not returned, the current condition is maintained. The is cleared to "0" by the hardware after a stop condition on the I2C bus is detected or arbitration is lost. (7) Start/Stop condition generation When the SBISR is "0", slave address and direction bit which are set to SBIDBR are output on a bus after generating a start condition by writing "1" to the SBICR2 . It is necessary to set transmitted data to the data buffer register (SBIDBR) and set "1" to beforehand.
SCL pin
1
2
3
4
5
6
7
8
9
SDA pin Start condition
A6
A5
A4
A3
A2
A1
A0
R/ W Acknowledge signal
Slave address and the direction bit
Figure 3.15.10 Start condition generation and slave address generation
When the is "1", a sequence of generating a stop condition is started by writing "1" to the , and "0" to the . Do not modify the contents of until a stop condition is generated on a bus. Figure 3.15.11 Stop condition generation
SCL pin SDA pin Stop condition
The state of the bus can be ascertained by reading the contents of SBISR. SBISR will be set to 1 if a start condition has been detected on the bus, and will be cleared to 0 if a stop condition has been detected.
92CF26A-356
2007-11-21
TMP92CF26A
(8) Interrupt service requests and interrupt cancellation When a serial bus interface interrupt request (INTSBI) occurs, the SBICR2 is cleared to "0". During the time that the SBICR2 is "0", the SCL line is pulled down to the Low level. The is cleared to "0" when a 1-word of data is transmitted or received. Either writing/reading data to/from SBIDBR sets the to "1". The time from the being set to "1" until the SCL line is released takes tLOW. In the address recognition mode ( = "0"), is cleared to "0" when the received slave address is the same as the value set at the I2CAR or when a GENERAL CALL is received (all 8-bit data are "0" after a start condition). Although SBICR2 can be set to "1" by the program, the is not clear it to "0" when it is written "0". (9) Serial bus interface operation mode selection SBICR2 is used to specify the serial bus interface operation mode. Set SBICR2< SBIM1:0> to "10" when the device is to be used in I2C Bus Mode after confirming pin condition of serial bus interface to "H". Switch a mode to port after confirming a bus is free. (10) Arbitration lost detection monitor Since more than one master device can exist simultaneously on the bus in I2C Bus Mode, a bus arbitration procedure has been implemented in order to guarantee the integrity of transferred data. In case set start condition bit with bus is busy, start condition is not output on SCL and SDA pin, but arbitration lost is generated. Data on the SDA line is used for I2C bus arbitration. The following shows an example of a bus arbitration procedure when two master devices exist simultaneously on the bus. Master A and Master B output the same data until point "a". After Master A outputs "L" and Master B, "H", the SDA line of the bus is wire-AND and the SDA line is pulled down to the Low-level by Master A. When the SCL line of the bus is pulled up at point b, the slave device reads the data on the SDA line, that is, data in Master A. A data transmitted from Master B becomes invalid. The state in Master B is called "ARBITRATION LOST". Master B device which loses arbitration releases the internal SDA output in order not to affect data transmitted from other masters with arbitration. When more than one master sends the same data at the first word, arbitration occurs continuously after the second word.
SCL pin Internal SDA output (Master A) Internal SDA output (Master B) SDA pin a b Internal SDA output becomes 1 after arbitration has been lost.
Figure 3.15.12 Arbitration lost
92CF26A-357
2007-11-21
TMP92CF26A
The TMP92CF26A compares the levels on the bus's SDA line with those of the internal SDA output on the rising edge of the SCL line. If the levels do not match, arbitration is lost and SBISR is set to "1". When SBISR is set to "1", SBISR are cleared to "00" and the mode is switched to Slave Receiver Mode. Thus, clock output is stopped in data transfer after setting ="1". SBISR is cleared to "0" when data is written to or read from SBIDBR or when data is written to SBICR2.
Internal SCL output Internal SDA output Internal SCL output Internal SDA output 1 2 3 4 5 6 7 8 9 1 2 3 4
Master A
D7A
D6A
D5A
D4A
D3A
D2A
D1A
D0A
D7A' D6A' D5A' D4A'
Stop the clock pulse 1 2 3 4 Master B
D7B
D6B
Keep Internal SDA output to high-level as losing arbitration

Accessed to SBIDBR or SBICR2
Figure 3.15.13 Example of when TMP92CF26A is a master device B (D7A = D7B, D6A = D6B)
(11)
Slave address match detection monitor SBISR is set to "1" in Slave Mode, in Address Recognition Mode (i.e. when I2CAR = "0"), when a GENERAL CALL is received, or when a slave address matches the value set in I2CAR. When I2CAR = "1", SBISR is set to "1" after the first word of data has been received. SBISR is cleared to "0" when data is written to or read from the data buffer register SBIDBR.
(12)
GENERAL CALL detection monitor SBISR is set to "1" in Slave Mode, when a GENERAL CALL is received (all 8-bit received data is "0", after a start condition). SBISR is cleared to "0" when a start condition or stop condition is detected on the bus.
(13)
Last received bit monitor The SDA line value stored at the rising edge of the SCL line is set to the SBISR. In the acknowledge mode, immediately after an INTSBI interrupt request is generated, an acknowledge signal is read by reading the contents of the SBISR.
92CF26A-358
2007-11-21
TMP92CF26A
(14) Software Reset function The software Reset function is used to initialize the SBI circuit, when SBI is rocked by external noises, etc. An internal Reset signal pulse can be generated by setting SBICR2 to "10" and "01". This initializes the SBI circuit internally. All command registers and status registers are initialized as well. SBICR1is automatically set to "1" after the SBI circuit has been initialized.
Note: If the software reset is executied , operation selection is reset, and its mode is set to port mode from I C mode.
2
(15)
Serial Bus Interface Data Buffer Register (SBIDBR) The received data can be read and transferred data can be written by reading or writing the SBIDBR. In the master mode, after the start condition is generated the slave address and the direction bit are set in this register.
(16)
I2CBUS Address Register (I2CAR) I2CAR is used to set the slave address when the TMP92CF26A functions as a slave device. The slave address output from the master device is recognized by setting the I2CAR to "0". The data format is the addressing format. When the slave address is not recognized at the = "1", the data format is the free data format.
(17)
Setting register for IDLE2 mode operation (SBIBR0) SBIBR0 is the register setting operation/stop during IDLE2-mode. Therefore, setting is necessary before the HALT instruction is executed.
92CF26A-359
2007-11-21
TMP92CF26A 3.15.6 Data Transfer in I2C Bus Mode
(1) Device initialization Set the SBICR1, Set SBIBR1 to "1" and clear bits 7 to 5 and 3 in the SBICR1 to "0". Set a slave address and the ( = "0" when an addressing format) to the I2CAR. For specifying the default setting to a slave receiver mode, clear "0" to the and set "1" to the , "10" to the .
765 SBICR1 0 0 0 I2CAR XXX SBICR2 0 0 0 Note: X: Don't care
4 X X 1
3 0 X 1
2 X X 0
1 X X 0
0 X X 0
Set acknowledge and SCL clock. Set slave address and address recognition mode. Set to slave receiver mode.
(2) Start condition and slave address generation a. Master Mode In the Master Mode, the start condition and the slave address are generated as follows. Check a bus free status (when = "0"). Set the SBICR1 to "1" (Acknowledge Mode) and specify a slave address and a direction bit to be transmitted to the SBIDBR. When SBICR2 = "0", the start condition are generated by writing "1111" to SBICR2. Subsequently to the start condition, nine clocks are output from the SCL pin. While eight clocks are output, the slave address and the direction bit which are set to the SBIDBR. At the 9th clock, the SDA line is released and the acknowledge signal is received from the slave device. An INTSBI interrupt request occurs at the falling edge of the 9th clock. The is cleared to "0". In the Master Mode, the SCL pin is pulled down to the Low-level while is "0". When an interrupt request occurs, the is changed according to the direction bit only when an acknowledge signal is returned from the slave device. Setting in main routine
76543210 Reg. Reg. if Reg. Then SBICR1 SBIDBR1 SBICR2
SBISR Reg. e 0x20 0x00 X X X 1 X X X X X X X X X X X X 1 1 1 1 1 0 0 0
Wait until bus is free. Set to acknowledgement mode. Set slave address and direction bit. Generate start condition.
In INTSBI interrupt routine INTCLR 0X2a Process End of interrupt
Clear the interrupt request
92CF26A-360
2007-11-21
TMP92CF26A
b. Slave Mode
In the Slave Mode, the start condition and the slave address are received. After the start condition is received from the master device, while eight clocks are output from the SCL pin, the slave address and the direction bit that are output from the master device are received. When a GENERAL CALL or the same address as the slave address set in I2CAR is received, the SDA line is pulled down to the Low-level at the 9th clock, and the acknowledge signal is output. An INTSBI interrupt request occurs on the falling edge of the 9th clock. The is cleared to "0". In Slave Mode the SCL line is pulled down to the Low-level while the = "0".
SCL pin SDA pin
1 A6 Start condition
2 A5
3 A4
4 A3
5 A2
6 A1
7 A0
8 R/ W
9 ACK Acknowledge signal from a slave device
Slave address + Direction bit
INTSBI interrupt request Output of master Output of slave
Figure 3.15.14 Start condition generation and slave address transfer
92CF26A-361
2007-11-21
TMP92CF26A
(3) 1-word Data Transfer Check the by the INTSBI interrupt process after the 1-word data transfer is completed, and determine whether the mode is a master or slave. a. If = "1" (Master Mode) Check the and determine whether the mode is a transmitter or receiver. When the = "1" (Transmitter mode) Check the . When is "1", a receiver does not request data. Implement the process to generate a stop condition (Refer to 3.15.6 (4)) and terminate data transfer. When the is "0", the receiver is requests new data. When the next transmitted data is 8 bits, write the transmitted data to SBIDBR. When the next transmitted data is other than 8 bits, set the and write the transmitted data to SBIDBR. After written the data, becomes "1", a serial clock pulse is generated for transferring a new 1-word of data from the SCL pin, and then the 1-word data is transmitted. After the data is transmitted, an INTSBI interrupt request occurs. The becomes "0" and the SCL line is pulled down to the Low-level. If the data to be transferred is more than one word in length, repeat the procedure from the checking above.
INTSBI interrupt if MST = 0 Then shift to the process when slave mode if TRX = 0 Then shift to the process when receiver mode. if LRB = 0 Then shift to the process that generates stop condition. 76543210 SBICR1 XXXXXXXX SBIDBR X X X X X X X X End of interrupt Note: X: Don't care Set the bit number of transmit and ACK. Write the transmit data.
SCL
1
2
3
4
5
6
7
8
9
Write to SBIDBR SDA D7 D6 D5 D4 D3 D2 D1 D0 ACK Acknowledge signal from a receiver
INTSBI interrupt request Output from master Output from slave
Figure 3.15.15 Example in which = "000" and = "1" in transmitter mode
92CF26A-362
2007-11-21
TMP92CF26A
When the is "0" (Receiver mode) When the next transmitted data is other than 8 bits, set and read the received data from SBIDBR to release the SCL line (data which is read immediately after a slave address is sent is undefined). After the data is read, becomes "1". Serial clock pulse for transferring new 1 word of data is defined SCL and outputs "L" level from SDA pin with acknowledge timing. An INTSBI interrupt request then occurs and the becomes "0", Then the TMP92CF26A pulls down the SCL pin to the Low-level. The TMP92CF26A outputs a clock pulse for 1-word of data transfer and the acknowledge signal each time that received data is read from the SBIDBR.
Read SBIDBR SCL pin 1 2 3 4 5 6 7 8 9
SDA pin
D7
D6
D5
D4
D3
D2
D1
D0
ACK
New D7
Acknowledge signal to a transmitter

INTSBI interrupt request
Output from Master Output from Slave
Figure 3.15.16 Example of when = "000", = "1" in receiver mode In order to terminate the transmission of data to a transmitter, clear to "0" before reading data which is 1-word before the last data to be received. The last data word does not generate a clock pulse as the Acknowledge signal. After the data has been transmitted and an interrupt request has been generated, set to "001" and read the data. The TMP92CF26A generates a clock pulse for a 1-bit data transfer. Since the master device is a receiver, the SDA line on the bus remains High. The transmitter interprets the High signal as an ACK signal. The receiver indicates to the transmitter that data transfer is complete. After the one data bit has been received and an interrupt request been generated, the TMP92CF26A generates a stop condition (see Section 3.15.6 (4) Stop condition generation) and terminates data transfer.
SCL pin
1
2
3
4
5
6
7
8
1
SDA pin
D7
D6
D5
D4
D3
D2
D1
D0
Acknowledge signal sent to a transmitter

INTSBI interrupt request
"0" Read SBIDBR
"001" Read SBIDBR Output of Master Output of Slave
Figure 3.15.17 Termination of data transfer in master receiver mode
92CF26A-363
2007-11-21
TMP92CF26A
Example: In case receive data N times INTSBI interrupt (After transmitting data)
76543210 SBICR1 X X X X X X X X Reg. SBIDBR End of interrupt Set the bit number of receive data and ACK. Load the dummy data.
INTSBI interrupt (Receive data of 1st to (N-2) th)
76543210 Reg. SBIDBR End of interrupt Load the data of 1st to (N-2)th.
INTSBI interrupt ((N-1) th Receive data)
76543210 SBICR1 X X X 0 0 X X X Reg. SBIDBR End of interrupt Not generate acknowledge signal Load the data of (N-1)th
INTSBI interrupt (Nth Receive data)
76543210 SBICR1 0 0 1 0 0 X X X Reg. SBIDBR End of interrupt Generate the clock for 1bit transmit Receive the data of Nth.
INTSBI interrupt (After receiving data)
The process of generating stop condition End of interrupt Note: X: Don't care Finish the transmit of data
92CF26A-364
2007-11-21
TMP92CF26A
b. If = 0 (Slave Mode)
In the slave mode the TMP92CF26A operates either in normal slave mode or in slave mode after losing arbitration. In the slave mode, an INTSBI interrupt request occurs when the TMP92CF26A receives a slave address or a GENERAL CALL from the master device, or when a GENERAL CALL is received and data transfer is complete, or after matching received address. In the master mode, the TMP92CF26A operates in a slave mode if it losing arbitration. An INTSBI interrupt request occurs when a word data transfer terminates after losing arbitration. When an INTSBI interrupt request occurs the is cleared to "0" and the SCL pin is pulled down to the Low-level. Either reading/writing from/to the SBIDBR or setting the to "1" will release the SCL pin after taking tLOW time. Check the SBISR, , , and and implements processes according to conditions listed in the next table.
Example: In case matching slave address in slave receive mode, direction bit is "1". INTSBI interrupt if TRX = 0 Then shift to other process if AL = 1 Then shift to other process if AAS = 0 Then shift to other process 76543210 SBICR1 XXX1XXXX SBIDBR XXXXXXXX Note: X: Don't care
Set the bit number of transmit. Set the data of transmit.
92CF26A-365
2007-11-21
TMP92CF26A
Table 3.15.2 Operation in the slave mode Conditions
The TMP92CF26A loses arbitration when transmitting a slave address and receives a slave address for which the value of the direction bit sent from another master is "1". In Salve Receiver Mode, the TMP92CF26A receives a slave address for which the value of the direction bit sent from the master is "1". Check the setting. If is set to "1", set to "1" since the receiver win no request the data which follows. Then, clear to "0" to release the bus. If is cleared to "0", set to the number of bits in a word and write the transmitted data to SBIDBR since the receiver requests next data.
Process
Set the number of bits a word in and write the transmitted data to SBIDBR
1
1
0
1 1
0
0 0 0 In Salve Transmitter Mode, a single word of is transmitted.
1 1
1/0
The TMP92CF26A loses arbitration when transmitting a slave address and receives a slave address or GENERAL CALL for which the value of the direction bit sent from another master is "0". The TMP92CF26A loses arbitration when transmitting a slave address or data and terminates word data transfer. In Slave Receiver Mode, the TMP92CF26A receives a slave address or GENERAL CALL for which the value of the direction bit sent from the master is "0". In Slave Receiver Mode, the TMP92CF26A terminates receiving word data. Set to the number of bits in a word and read the received data from SBIDBR. Read the SBIDBR for setting the to "1" (reading dummy data) or set the to "1".
0 0
0
1 0
1/0
0
1/0
92CF26A-366
2007-11-21
TMP92CF26A
(4) Stop condition generation When SBISR = "1", the sequence for generating a stop condition start by writing "1" to SBICR2 and "0" to SBICR2. Do not modify the contents of SBICR2 until a stop condition has been generated on the bus. When the bus's SCL line has been pulled Low by another device, the TMP92CF26A generates a stop condition when the other device has released the SCL line and SDA pin rising.
76543210 SBICR2
11011000
Generate stop condition.
"1" "1" "0" "1" Internal SCL
Stop condition
SCL pin
SDA Pin
(Read)
Figure 3.15.18 Stop condition generation (Single master)
"1" "1" "0" "1" Internal SCL
The case of pulled low
Stop condition
SCL Pin
by another device
SDA Pin

(Read)
Figure 3.15.19 Stop condition generation (Multi master)
92CF26A-367
2007-11-21
TMP92CF26A
(5) Restart Restart is used during data transfer between a master device and a slave device to change the data transfer direction. The following description explains how to restart when the TMP92CF26A is in Master Mode. Clear SBICR2 to 0 and set SBICR2 to 1 to release the bus. The SDA line remains High and the SCL pin is released. Since a stop condition has not been generated on the bus, other devices assume the bus to be in busy state. And confirm SCL pin, that SCL pin is released and become bus-free state by SBISR = "0" or signal level "1" of SCL pin in port mode. Check the until it becomes 1 to check that the SCL line on a bus is not pulled down to the low-level by other devices. After confirming that the bus remains in a free state, generate a start condition using the procedure described in (2). In order to satisfy the set-up time requirements when restarting, take at least 4.7 s of waiting time by software from the time of restarting to confirm that the bus is free until the time to generate the start condition.
765 SBICR2 0 0 0 if SBISR 0 Then if SBISR 1 Then 4.7 s Wait SBICR1 X X X SBIDBR X X X SBICR2 1 1 1 Note: X: Don't care
43210 11000
Release the bus Check if SCL pin is released. Check if SCL pin of other device is "L" level.
1XXXX XXXXX 11000
Set acknowledgement mode. Set the slave address and direction bit. Generate start condition.
"0" "0" "0" "1"
"1" "1" "1" "1" 4.7 s (Min) Start condition
SCL line Internal SCL output SDA line 9
Figure 3.15.20 Timing chart for generate restart
Note: Don't write = "0", when = "0" condition. (Cannot be restarted)
92CF26A-368
2007-11-21
TMP92CF26A
3.16 USB Controller
3.16.1 Outline
This USB controller (UDC) is designed to support a variety of serial links in the construction of a USB system. The outline is as follows: (1) Compliant with USB rev1.1 (2) Full-speed: 12 Mbps (low-speed (1.5 Mbps) not supported) (3) Auto bus enumeration with 384-byte descriptor RAM (4) Supports 3 kinds of transfer type: Control, interrupt and bulk * * * * Endpoint 0: Endpoint 1: Endpoint 2: Endpoint 3: Control 64 bytes x 1-FIFO BULK (out) BULK (in) Interrupt (in) 64 bytes x 2-FIFO 64 bytes x 2-FIFO 8 bytes x 1-FIFO
(5) Built-in DPLL which generates sampling clock for receive data (6) Detecting and generating SOP, EOP, RESUME, RESET and TIMEOUT (7) Encoding and decoding NRZI data (8) Inserting and discarding stuffed bit (9) Detecting and checking CRC (10) Generating and decoding packet ID (11) Built-in power management function (12) Dual packet mode supported
Note1:The TMP92CF26A does not include the pull-up resister necessary for D+pin. An external pull-up resistor plus software support is required. Note2:There are some differences between our specifications and USB 1.1. Refer to check "3.16.11 Notice and Restrictions".
92CF26A-369
2007-11-21
TMP92CF26A
3.16.1.1 System Configuration The USB controller (UDC) consists of the following 3 blocks. 1. 2. 3. 900/H1 CPU I/F (details given in Section 3.16.2, below). UDC core block (DPLL, SIE, IFM and PWM), request controller, descriptor RAM and 4 endpoint FIFO (details given in Section 3.16.3, below). USB transceiver
UDC
Descriptor RAM 384 bytes
Request controller 900/H1 CPU interface
ADDRESS WR RD
UDC core Endpoint 0: FIFO (64 bytes x 1) I/F PWM Endpoint 1: FIFO (64 bytes x 2)
FIFO manager
DPLL IFM Endpoint 2: FIFO (64 bytes x 2)
SIE Endpoint 3: FIFO (8 bytes x 1)
USB transceiver
D+ D-
Figure 3.16.1 UDC Block Diagram
92CF26A-370
2007-11-21
TMP92CF26A
3.16.1.2 Example
USB host USB host USB USB Connector Connector GND VBUS R6 USB cable R8 R7 R1 R2 D+ VCC VSS INTx (detect rising) PorTXX X1USB 48MHz X2 10MHz USB device TMP92CF26A X1
R9
R4
R5
R3
D-
OFF at "H"
OFF at "H"
The above setting is required If when using the TMP92CF26A's USB controller. 1) Pull-up of D+ pin In the USB standard, in Full Speed connection, the D+ pin must be set to pull-up. The ON/OFF control of this pull-up must be by S/W. Recommended value: R1=1.5k 2) Add cascade resistor of D+, D-signal In the USB standard, for a D+ or D- signal, a cascade resistor must be added to each signal. Recommended value : R2=27, R3=27 3) Flow current provision of the Connector connection and D+ pin, D- pin For the D+ and D- pin of the TMP92CF26A, the level must be fixed for flow current provision when not in use (when not connected to host). In this case, the connector detection signal is used to control the pull-down resistor which determines the level. Recommended value: R4=10k, R5=10k The example shows use of the connector detection method by using VBUS (5V voltage).
Note: Where waveform rise is solw, buffering of wabeform is recommended.
Recommended value: R6=60k, R7=100k (VBUS current consumption when suspended is <500A) 4) Connection of 10MHz oscillator to X1,X2, or input 48MHz clock to X1USB When using USB with a combination of 10MHz external oscillator and internal PLL, the number of external hub stages which can be used is restricted by the accuracy of the internal (Max 3 stages). If 5 stages connection is required for external hub, it is required that input 48MHz clock from X1USB pin (Restriction 2500ppm.)
92CF26A-371
2007-11-21
TMP92CF26A
5) HOST side pull-down resistor In the USB standard, set pull-down D+ pin and D- signal at USB_HOST side. Recommended value: R8=15k, R9=15k
Note: The above connections and resistor values, etc, are given as examples only. Operation is not guaranteed. Please confirm the latest USB standar specifications and operations on your system.
92CF26A-372
2007-11-21
TMP92CF26A 3.16.2 900/H1 CPU I/F
The 900/H1 CPU I/F is a bridge between the 900/H1 CPU and the UDC. Its main functions are as follow. * * * INTUSB (interrupt from UDC) generation A bridge for SFR USB clock control (48 MHz)
3.16.2.1 SFRs The 900/H1 CPU I/F incorporates the following SFRs to control the UDC and USB transceiver. * USB control USBCR1 USBINTFR1 USBINTFR2 USBINTFR3 USBINTFR4 USBINTMR1 USBINTMR2 USBINTMR3 USBINTMR4 (USB control register 1) (USB interrupt flag register 1) (USB interrupt flag register 2) (USB interrupt flag register 3) (USB interrupt flag register 4) (USB interrupt mask register 1) (USB interrupt mask register 2) (USB interrupt mask register 3) (USB interrupt mask register 4) * USB interrupt control
Figure 3.16.2 900/H1 CPU I/F SFR
Address
07F0H 07F1H 07F2H 07F3H 07F4H 07F5H 07F6H 07F7H 07F8H
Read/Write
R/W R/W R/W R/W R/W R/W R/W R/W R/W
SFR Symbol
USBINTFR1 USBINTFR2 USBINTFR3 USBINTFR4 USBINTMR1 USBINTMR2 USBINTMR3 USBINTMR4 USBCR1
92CF26A-373
2007-11-21
TMP92CF26A
3.16.2.2 USBCR1 Register This register is used to set USB clock enables, transceiver enable etc.
7
USBCR1 (07F8H) bit Symbol Read/Write Reset State Function TRNS_USE R/W 0
6
WAKEUP R/W 0
5
4
3
2
1
SPEED R/W 1
0
USBCLKE R/W 0
*
TRNS_USE
(Bit7)
0: Disable USB transceiver 1: Enable USB transceiver
Set to "1" for TMP92CF26A. * WAKEUP
0: - 1: Start remote-wakeup function
(Bit6)
When the remote-wakeup function Current_Config.
is
needed,
first
check
If = "1" (meaning SUSPEND-status), write "1", and "0" to . This will initiate the remote-wakeup function. If = "0" or EP0, 1, 2, 3_STATUS = "0", do not write "1" to . * SPEED
0: Reserved
(Bit1)
1: Full speed (12 MHz)
This bit selects USB speed. Set to "1" for TMP92CF26A. * USBCLKE (Bit0)
0: Disable USB clock 1: Enable USB clock
This bit controls supply of USB clock. The USB clock ("fUSB": 48MHz) is generated by an internal PLL. When the USB is started, write "1" to after confirming PLL lock up is terminated. Also, write "0" to before stopping the PLL.
92CF26A-374
2007-11-21
TMP92CF26A
3.16.2.3 USBINTFRn, MRn Register These SFRs control the INTUSB (only one interrupt to CPU) using the 23 interrupt sources output by the UDC. The USBINTMRn are mask registers and the USBINTFRn are flag registers. In the INTUSB routine, execute operations according to generated interrupt source after checking USBINTFRn. The common specification for all MASK and FLAG registers is shown below.
(Common
specifications for all mask and flag registers.)
Mask register Interrupt source (Set by rising edge) Flag register Writing "0" to flag register A B C D
A: The flag register is not set because mask register = "1". B: The flag register is not set because interrupt souce changes "1" "0". C: The flag register is set because mask register = "0" and interrupt souce changes "0" "1". D: The flag register is reset to "0" by writing "0" to flag register.
Note 1: The "INTUSB generated number" and "bit number which is set to flag register" are not always equal. In the INTUSB interrupt routine, clear FLAG register (USBINTFRn) after checking it. The interrupt request flag, which occurrs between the INTUSB interrupt routine and flag register (USBINTFRn) read, is kept in the interrupt controller. Therefore, after returning from the interrupt routine, the CPU jumps to INTUSB interrupt routine again. Software support is required to avoid ending in an error routine when none of the bits in the flag register (USBINTFRn) is set to "1". Note 2: Disable INTUSB (write 00H to INTEUSB register) before writing to USBINTMRn or USBINTFRn.
92CF26A-375
2007-11-21
TMP92CF26A
7
USBINTFR1
6
INT_URST_END
5
INT_SUS
4
INT_RESUME
3
INT_CLKSTOP
2
INT_CLKON
1
0
bit Symbol Read/Write Reset State Function
INT_URST_STR
(07F0H) Prohibit to readmodifywrite
R/W 0
R/W 0
R/W 0
R/W 0 When write 1: -
R/W 0 0: Clear flag
R/W 0
When read 0: Not generate interrupt 1: Generate interrupt
Note: The above interrupts can release Halt state from IDLE2 and IDLE1 mode. (STOP mode cannot be released) *Those 6 interrupts of all 24 INTUSB sources can release Halt state from IDLE1 mode. Therefore, a low power dissipation system can be built. However, the method of use is limited as below. Shift to IDLE1 mode : Execute Halt instruction when the INT_SUS or INT_CLKSTOP flag is "1" ( SUSPEND state ) Release from IDLE1 mode : Release Halt state by INT_RESUME or INT_CLKON request (request of release SUSPEND ) Release Halt state by INT_URST_STR or INT_URST_request (request of RESET )
*
INT_URST_STR (Bit7) This is the flag register for INT_URST_STR ("USB reset" start - interrupt). This is set to "1" when the UDC started to receive a "USB reset" signal from a USB-host. An application program has to initialize the whole UDC with this interrupt.
*
INT_URST_END (Bit6) This is the flag register for INT_URST_END ("USB reset" end - interrupt). This is set to "1" when the UDC receives a "USB reset end" signal from a USB-host.
*
INT_SUS (Bit5) This is the flag register for INT_SUS (suspend - interrupt). This is set to "1" when the USB changes to "suspend status".
*
INT_RESUME (Bit4) This is the flag register for INT_RESUME (resume - interrupt). This is set to "1" when the USB changes to "resume status".
*
INT_CLKSTOP (Bit3) This is the flag register for INT_CLKSTOP (enables stopping of the clock supply - interrupt). This is set to "1" when the USB enables a stopping of the clock supply after changing to "suspend status".
*
INT_CLKON (Bit2) This is the flag register for INT_CLKON (enabled starting clock supply interrupt). This is set to "1" when the USB enables a starting of the clock supply after changing to "resume status".
92CF26A-376
2007-11-21
TMP92CF26A
7
USBINTFR2 bit Symbol
EP1_FULL_A
6
EP1_Empty_A
5
EP1_FULL_B
4
EP1_Empty_B
3
EP2_FULL_A
2
EP2_Empty_A
1
EP2_FULL_B
0
EP2_Empty_B
(07F1H)
Read/Write
R/W 0
R/W 0
R/W 0
R/W 0
R/W 0
R/W 0 1: -
R/W 0
R/W 0
Prohibit to Reset State read Function -modify -write
When read 0: Not generate interrupt 1: Generate interrupt
When write 0: Clear flag
Note: The above interrupt can release Halt state from IDLE2 mode. (IDLE1 and STOP mode cannot be released.)
7
USBINTFR3 bit Symbol
EP3_FULL_A
6
EP3_Empty_A
5
EP3_FULL_B
4
EP3_Empty_B
3
2
1
0
(07F2H) Prohibit to read -modify -write
Read/Write Reset State Function
R/W 0
When read When write
R/W 0
R/W 0
0: Not generate interrupt 1: Generate interrupt 0: Clear flag
R/W 0
1: - Note: The above interrupt can release Halt state from IDLE2 mode. (IDLE1 and STOP mode cannot be released.)
*
EPx_FULL_A/B:
(When transmitting) This is set to "1" when CPU full write data to FIFO_A/B. (When receiving) This is set to "1" when UDC full receive data to FIFO_A/B.
*
EPx_Empty_A/B:
(When transmitting) This is set to "1" when FIFO become empty after transmission. (When receiving) This is set to "1" when FIFO becomes empty after CPU reads all data from FIFO.
Note: The EPx_FULL_A/B and EPx_Empty_A/B flags are not status flags. Therefore, check DATASET register to determine if the FIFO-status is needed.
92CF26A-377
2007-11-21
TMP92CF26A
7
USBINTFR4 bit Symbol
INT_SETUP
6
INT_EP0
5
INT_STAS
4
INT_STASN
3
INT_EP1N
2
INT_EP2N
1
INT_EP3N
0
(07F3H) Prohibit to read -modify -write
Read/Write Reset State Function
R/W 0
R/W 0
R/W 0
R/W 0 When write
R/W 0 0: Clear flag 1: -
R/W 0
R/W 0
When read 0: Not generate interrupt 1: Generate interrupt
Note: The above interrupt can release Halt state from IDLE2 mode. (IDLE1 and STOP mode cannot be released.)
*
INT_SETUP (Bit7) This is the flag register for INT_SETUP (setup - interrupt). This is set to "1" when the UDC receives a request that S/W (software) control is needed from USB host. Using S/W (INT_SETUP routine), first read 8-byte device requests from the UDC and execute operation according to each request.
*
INT_EP0 (Bit6) This is the flag register for INT_EP0 (received data of the data phase for Control transfer type - interrupt). This is set to "1" when the UDC receives data of the data phase for Control transfer type. If this interrupt occurs during Control write transfer, data reading from FIFO is needed. If this interrupt occurs during Control read transfer, transmission data writing to FIFO is needed. In some cases, the host may not assert "ACK" of the last packet in the data stage. In this case, this interrupt cannot be generated. Therefore, ignore this interrupt if it occurs after the last packet data has been written in the data stage because the transmission data number is specified by the host, or it depends on the capacity of the device.
*
INT_STAS (Bit5) This is the flag register for INT_STAS (status stage end - interrupt). This is set to "1" when the status stage ends. If this interrupt is generated, it means that request ended normally. If this interrupt is not generated and INT_SETUP is generated, EP0_STATUS is set to "1", and it means that request did not end normally.
92CF26A-378
2007-11-21
TMP92CF26A
*
INT_STASN (Bit4) This is the flag register for INT_STASN (change host status stage - interrupt). This is set to "1" when the USB host changes to status stage at the Control read transfer. This interrupt is needed if data length is less than wLength (specified by the host). But if the USB host changes to status stage, this interrupt is always generated because this signal is designed by using NAK of the first packet. So, use mask register USBINTMRn to avoid this interrupt always being generated. Mask this interrupt before data of the last payload is written.
*
INT_EPxN (Bit3, 2, 1) This is the flag register for INT_EPxN (NAK acknowledge to the USB host interrupt). This is set to "1" when the Endpoint1, 2 and 3 transmit NAK.
92CF26A-379
2007-11-21
TMP92CF26A
7
USBINTMR1 bit Symbol
6
R/W 1
5
MSK_SUS
4
MSK_RESUME
3
MSK_CLKSTOP
2
MSK_CLKON
1
0
MSK_URST_STR MSK_URST_END
(07F4H)
Read/Write Reset State Function
R/W 1
R/W 1 1: masked
R/W 1 1: -
R/W 1
R/W 1
When read 0: not masked When write 0: Clear flag
* * * * * *
MSK_URST_STR (Bit7) This is the mask register for USBINTFR1. MSK_URST_END (Bit6) This is the mask register for USBINTFR1. MSK_SUS (Bit5) This is the mask register for USBINTFR1. MSK_RESUME (Bit4) This is the mask register for USBINTFR1. MSK_CLKSTOP (Bit3) This is the mask register for USBINTFR1. MSK_CLKON (Bit2) This is the mask register for USBINTFR1.
92CF26A-380
2007-11-21
TMP92CF26A
7
USBINTMR2 bit Symbol
EP1_MSK_FA
6
EP1_MSK_EA
5
EP1_MSK_FB
4
EP1_MSK_EB
3
EP2_MSK_FA
2
EP2_MSK_EA
1
EP2_MSK_FB
0
EP2_MSK_EB
(07F5H)
Read/Write Reset State Function
R/W 1
R/W 1
R/W 1
R/W 1
R/W 1 1: -
R/W 1
R/W 1
R/W 1
When read 0: not masked When write 0: Clear flag 1: masked
*
EP1/2_MSK_FA/FB/EA/EB This is the mask . 7 6
EP3_MSK_EA
register
for
USBINTFR2
or
5
4
3
2
1
0
USBINTMR3 bit Symbol Read/Write (07F6H)
EP3_MSK_FA
R/W 1
When read
R/W 1
0: not masked 1: masked
Reset State Function
When write 0: Clear flag 1: -
*
EP3_MSK_FA/FB/EA/EB: This is the mask register for USBINTFR3 or .
92CF26A-381
2007-11-21
TMP92CF26A
7
USBINTMR4 bit Symbol
MSK_SETUP
6
MSK_EP0
5
MSK_STAS
4
MSK_STASN
3
MSK_EP1N
2
MSK_EP2N
1
MSK_EP3N
0
(07F7H)
Read/Write Reset State Function
R/W 1
R/W 1
R/W 1 1: Be masked
R/W 1
R/W 1 1: -
R/W 1
R/W 1
When read 0: Be not masked When write 0: Clear flag
* * * * * * * *
MSK_SETUP (Bit7) This is the mask register for USBINTFR4. MSK_EP0 (Bit6) This is the mask register for USBINTFR4. MSK_STAS (Bit5) This is the mask register for USBINTFR4. MSK_STASN (Bit4) This is the mask register for USBINTFR4. MSK_EP1N (Bit3) This is the mask register for USBINTFR4. MSK_EP2N (Bit2) This is the mask register for USBINTFR4. MSK_EP3N (Bit1) This is the mask register for USBINTFR4.
92CF26A-382
2007-11-21
TMP92CF26A 3.16.3 UDC CORE
The UDC CORE has the following SFRs to control the UDC and USB transceiver. a) FIFO
Endpoint 0 to 3 FIFO register
3.16.3.1 SFRs
b)
Device request
bmRequestType wValue_L wIndex_L wLength_L register register register register bRequest wValue_H wIndex_H wLength_H register register register register
c)
Status
Current_Config StandardRequest EPx_STATUS register register register USB_STATE Request register register
d)
Setup
EPx_BCS Standard Request Mode Descriptor RAM register register register EPx_SINGLE Request Mode PortStatus register register register
e)
Control
EPx_MODE COMMAND Setup Received register register register EOP INT_ Control USBREADY register register register
f)
Others
ADDRESS EPx_SIZE_L_A EPx_SIZE_L_B FRAME_L USBBUFF TEST register register register register register DATASET EPx_SIZE_H_A EPx_SIZE_H_B FRAME_H register register register register
92CF26A-383
2007-11-21
TMP92CF26A
Figure 3.16.3 UDC CORE SFRs (1/3) Address
0500H 0501H 0502H 0503H 067DH 067EH 067FH 0780H 0781H 0782H 0783H *0784H *0785H *0786H *0787H *0788H 0789H 078AH 078BH *078CH *078DH *078EH *078FH 0790H 0791H 0792H 0793H *0794H *0795H *0796H *0797H 0798H 0799H 079AH 079BH *079CH *079DH *079EH *079FH 07A1H 07A2H 07A3H *07A4H *07A5H *07A6H *07A7H *07A8H
Read/Write
R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W - R/W R/W R/W R/W R/W R/W R/W R R R R R R R R R R R R R R R R R R R R R R R -
SFR Symbol
Descriptor RAM0 Descriptor RAM1 Descriptor RAM2 Descriptor RAM3 Descriptor RAM381 Descriptor RAM382 Descriptor RAM383 ENDPOINT0 ENDPOINT1 ENDPOINT2 ENDPOINT3 ENDPOINT4 ENDPOINT5 ENDPOINT6 ENDPOINT7 Reserved EP1_MODE EP2_MODE EP3_MODE EP4_MODE EP5_MODE EP6_MODE EP7_MODE EP0_STATUS EP1_STATUS EP2_STATUS EP3_STATUS EP4_STATUS EP5_STATUS EP6_STATUS EP7_STATUS EP0_SIZE_L_A EP1_SIZE_L_A EP2_SIZE_L_A EP3_SIZE_L_A EP4_SIZE_L_A EP5_SIZE_L_A EP6_SIZE_L_A EP7_SIZE_L_A EP1_SIZE_L_B EP2_SIZE_L_B EP3_SIZE_L_B EP4_SIZE_L_B EP5_SIZE_L_B EP6_SIZE_L_B EP7_SIZE_L_B Reserved
Note: "*" is not used in the TMP92CF26A.
92CF26A-384
2007-11-21
TMP92CF26A
Figure 3.16.4 UDC CORE SFRs (2/3) Address
07A9H 07AAH 07ABH *07ACH *07ADH *07AEH *07AFH 07B1H 07B2H 07B3H *07B4H *07B5H *07B6H *07B7H 07C0H 07C1H 07C2H 07C3H 07C4H 07C5H 07C6H 07C7H 07C8H 07C9H 07CAH 07CBH 07CCH 07CDH 07CEH 07CFH 07D0H 07D1H *07D1H 07D3H *07D4H *07D5H 07D6H *07D7H 07D8H 07D9H *07DAH *07DBH *07DCH *07DDH 07DEH 07DFH
Read/Write
R R R R R R R R R R R R R R R R R R R R R R W R R R R R R W W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W R/W W R
SFR Symbol
EP1_SIZE_H_A EP2_SIZE_H_A EP3_SIZE_H_A EP4_SIZE_H_A EP5_SIZE_H_A EP6_SIZE_H_A EP7_SIZE_H_A EP1_SIZE_H_B EP2_SIZE_H_B EP3_SIZE_H_B EP4_SIZE_H_B EP5_SIZE_H_B EP6_SIZE_H_B EP7_SIZE_H_B bmRequestType bRequest wValue_L wValue_H wIndex_L wIndex_H wLength_L wLength_H Setup Received Current_Config Standard Request Request DATASET1 DATASET2 USB_STATE EOP COMMAND EPx_SINGLE1 EPx_SINGLE2 EPx_BCS1 EPx_BCS2 Reserved INT_Control Reserved Standard Request Mode Request Mode Reserved Reserved Reserved Reserved ID_CONTROL ID_STATE
Note: "*" is not used in the TMP92CF26A.
92CF26A-385
2007-11-21
TMP92CF26A
Figure 3.16.5 UDC CORE SFRs (3/3) Address
07E0H 07E1H 07E2H 07E3H *07E4H *07E5H 07E6H *07E7H 07E8H
Read/Write
R/W R R R - - R/W - W Port_Status FRAME_L FRAME_H ADDRESS Reserved Reserved USBREADY Reserved
SFR Symbol
Set Descriptor STALL
Note: "*" is not used in the TMP92CF26A.
92CF26A-386
2007-11-21
TMP92CF26A
3.16.3.2 EPx_FIFO Register (x: 0 to 3) This register is prepared for each endpoint independently. This is the window register from or to FIFO RAM. In the auto bus enumeration, the request controller in UDC sets the mode, which is defined by the endpoint descriptor for each endpoint automatically. By this means, each endpoint is automatically set to each voluntary direction. 7
Endpoint0 bit Symbol (0780H) Read/Write Reset State R/W
Undefined
6
R/W
Undefined
5
R/W
Undefined
4
R/W
Undefined
3
R/W
Undefined
2
R/W
Undefined
1
R/W
Undefined
0
R/W
Undefined
EP0_DATA7 EP0_DATA6 EP0_DATA5 EP0_DATA4 EP0_DATA3 EP0_DATA2 EP0_DATA1 EP0_DATA0
7
Endpoint1 bit Symbol (0781H) Read/Write Reset State R/W Undefined
6
R/W Undefined
5
R/W Undefined
4
R/W Undefined
3
R/W Undefined
2
R/W Undefined
1
R/W Undefined
0
R/W Undefined
EP1_DATA7 EP1_DATA6 EP1_DATA5 EP1_DATA4 EP1_DATA3 EP1_DATA2 EP1_DATA1 EP1_DATA0
7
Endpoint2 bit Symbol (0782H) Read/Write Reset State R/W Undefined
6
R/W Undefined
5
R/W Undefined
4
R/W Undefined
3
R/W Undefined
2
R/W Undefined
1
R/W Undefined
0
R/W Undefined
EP2_DATA7 EP2_DATA6 EP2_DATA5 EP2_DATA4 EP2_DATA3 EP2_DATA2 EP2_DATA1 EP2_DATA0
7
Endpoint3 bit Symbol (0783H) Read/Write Reset State R/W Undefined
6
R/W Undefined
5
R/W Undefined
4
R/W Undefined
3
R/W Undefined
2
R/W Undefined
1
R/W Undefined
0
R/W Undefined
EP3_DATA7 EP3_DATA6 EP3_DATA5 EP3_DATA4 EP3_DATA3 EP3_DATA2 EP3_DATA1 EP3_DATA0
Note: Read or write to these window registers using 1-byte load instructions only, since each register has only a 1byte address. Do not use load instructions of 2 bytes or 4 bytes.
The device request that is received from the USB host is stored in the to following 8-byte registers: bmRequestType, bRequest, wValue_L, wValue_H, wIndex_L, wIndex_H, wLength_L and wLength_H. These are updated whenever a new SETUP token is received from the host. When the UDC receives without error, INT_SETUP interrupt is asserted, meaning the new device request has been received. There is also request which is operated automatically by the UDC, depending on the request received. In that case, the UDC does not assert the INT_SETUP interrupt. Any request which the UDC is currently operating can be checked by reading STANDARD_REQUEST_FLAG and REQUEST_FLAG.
92CF26A-387
2007-11-21
TMP92CF26A
3.16.3.3 bmRequestType Register This register shows the bmRequestType field of the device request. 7
bmRequestType bit Symbol DIRECTION
6
REQ_TYPE1
5
REQ_TYPE0
4
RECIPIENT4
3
RECIPIENT3
2
RECIPIENT2
1
RECIPIENT1
0
RECIPIENT0
(07C0H)
Read/Write Reset State
R 0
R 0
R 0
R 0
R 0
R 0
R 0
R 0
DIRECTION (Bit7)
0: from host to device 1: from device to host
REQ_TYPE [1:0] (Bit6 to bit5)
00: Standard 01: Class 10: Vendor 11: (Reserved)
RECIPIENT [4:0] (Bit4 to bit0)
00000: Device 00001: Interface 00010: Endpoint 00011: etc. Others: (Reserved)
3.16.3.4 bRequest Register This register shows the bRequest field of the device request. 7
bRequest bit Symbol (07C1H) Read/Write Reset State (Standard) 00000000: GET_STATUS 00000001: CLEAR_FEATURE 00000010: Reserved 00000011: SET_FEATURE 00000100: Reserved 00000101: SET_ADDRESS 00000110: GET_DESCRIPTOR 00000111: SET_DESCRIPTOR 00001000: GET_CONFIGURATION 00001001: SET_CONFIGURATION 00001010: GET_INTERFACE 00001011: SET_INTERFACE 00001100: SYNCH_FRAME R 0
6
R 0
5
R 0
4
R 0
3
R 0
2
REQUEST2 R 0
1
R 0
0
R 0
REQUEST7 REQUEST6 REQUEST5 REQUEST4 REQUEST3
REQUEST1 REQUEST0
(Printer class) 00000000: GET_DEVICE_ID 00000001: GET_PORT_STATUS 00000010: SOFT_RESET
92CF26A-388
2007-11-21
TMP92CF26A
3.16.3.5 wValue Register There are 2 registers; the wValue_L register and wValue_H register. wValue_L shows the lower-byte of the wValue field of the device request, and wValue_H register shows the upper byte. 7
wValue_L bit Symbol (07C2H) Read/Write Reset State VALUE_L7 R 0
6
VALUE_L6 R 0
5
VALUE_L5 R 0
4
VALUE_L4 R 0
3
VALUE_L3 R 0
2
VALUE_L2 R 0
1
VALUE_L1 R 0
0
VALUE_L0 R 0
7
wValue_H bit Symbol (07C3H) Read/Write Reset State VALUE_H7 R 0
6
VALUE_H6 R 0
5
VALUE_H5 R 0
4
VALUE_H4 R 0
3
VALUE_H3 R 0
2
VALUE_H2 R 0
1
VALUE_H1 R 0
0
VALUE_H0 R 0
3.16.3.6 wIndex Register There are 2 registers, the wIndex_L register and wIndex_H register. the wIndex_L register shows the lower byte of the wIndex field of the device request, and wIndex_H register shows the upper byte. These are usually used to transfer index or offset. 7
wIndex_L (07C4H) bit Symbol Read/Write Reset State
INDEX_L7
6
INDEX_L6
5
INDEX_L5
4
INDEX_L4
3
INDEX_L3
2
INDEX_L2
1
INDEX_L1
0
INDEX_L0
R 0
R 0
R 0
R 0
R 0
R 0
R 0
R 0
7
wIndex_H bit Symbol (07C5H) Read/Write Reset State
INDEX_H7
6
INDEX_H6
5
INDEX_H5
4
INDEX_H4
3
INDEX_H3
2
INDEX_H2
1
INDEX_H1
0
INDEX_H0
R 0
R 0
R 0
R 0
R 0
R 0
R 0
R 0
3.16.3.7 wLength Register There are 2 registers, the wLength_L register and wLength_H register. The wLength_L register shows the lower-byte of the wLength field of the device request and wLength_H register shows the upper byte. In the case of data phase, these registers show the byte number to transfer. 7
wLength_L bit Symbol
6
R 0
5
R 0
4
R 0
3
R 0
2
R 0
1
R 0
0
R 0
LENGTH_L7 LENGTH_L6 LENGTH_L5 LENGTH_L4 LENGTH_L3 LENGTH_L2 LENGTH_L1 LENGTH_L0 R 0
(07C6H)
Read/Write Reset State
7
wLength_H
6
R 0
5
R 0
4
R 0
3
R 0
2
R 0
1
R 0
0
R 0
bit Symbol Read/Write Reset State
LENGTH_H7 LENGTH_H6 LENGTH_H5 LENGTH_H4 LENGTH_H3 LENGTH_H2 LENGTH_H1 LENGTH_H0 R 0
(07C7H)
92CF26A-389
2007-11-21
TMP92CF26A
3.16.3.8 Setup Received Register This register informs the UDC that an application program has recognized the INT_SETUP interrupt. 7
SetupReceived bit Symbol
6
D6 W 0
5
D5 W 0
4
D4 W 0
3
D3 W 0
2
D2 W 0
1
D1 W 0
0
D0 W 0
D7 W 0
(07C8H)
Read/Write Reset State
If this register is accessed by an application program, the UDC disables access to the EP0's FIFO RAM because the UDC recognizes the device request has been received. This is to protect data stored in the EP0 in the time between the completion of the previous device request and the recognition by the application program of the INT_SETUP interrupt relating to a new request f. Therefore, write "00H" to this register when the device request in INT_SETUP routine is recognized.
Note : A recovery time of 2clock at 12MHz is needed after writing to this register in order to access EP0_FIFO.
3.16.3.9 Current_Config Register This register shows the present value that is set by SET_CONFIGURATION and SET_INTERFACE. 7
Current_Config bit Symbol
REMOTEWAKEUP
6
5
ALTERNATE[1]
4
ALTERNATE[0]
3
INTERFACE[1]
2
INTERFACE[0]
1
CONFIG[1]
0
CONFIG[0]
(07C9H)
Read/Write Reset State
R 0
R 0
R 0
R 0
R 0
R 0
R 0
CONFIG[1:0] (Bit1 to bit0)
00: UNCONFIGURED 01: CONFIGURED1 10: CONFIGURED2 Set to UNCONFIGURED by the host. Set to CONFIGURED 1 by the host. Set to CONFIGURED 2 by the host.
INTERFACE[1:0] (Bit3 to bit2)
00: INTERFACE0 01: INTERFACE1 10: INTERFACE2 Set to INTERFACE 0 by the host. Set to INTERFACE 1 by the host. Set to INTERFACE 2 by the host.
ALTERNATE[1:0] (Bit5 to bit4)
00: ALTERNATE0 01: ALTERNATE1 10: ALTERNATE2 Set to ALTERNATE 0 by the host. Set to ALTERNATE 1 by the host. Set to ALTERNATE 2 by the host.
REMOTE WAKEUP (Bit7)
0: Disable 1: Enable Disabled remote wakeup by the host. Enabled remote wakeup by the host.
Note1: CONFIG, INTERFACE and ALTERNATE each support 3 kinds (0,1 and 2). Note2: If each request is controlled by S/W, this register is not set.
92CF26A-390
2007-11-21
TMP92CF26A
3.16.3.10 Standard Request Register This register shows the standard request currently being executed. Any bit which is set to "1" shows a request currently being executed. 7
Standard Request
6
R 0
5
S_CONFIG
4
G_CONFIG
3
G_DESCRIPT
2
S_FEATURE
1
C_FEATURE
0
G_STATUS
bit Symbol Read/Write Reset State
S_INTERFACE G_INTERFACE
(07CAH)
R 0
R 0
R 0
R 0
R 0
R 0
R 0
S_INTERFACE G_INTERFACE S_CONFIG G_CONFIG G_DESCRIPT S_FEATURE C_FEATURE G_STATUS
(Bit 7) : SET_INTERFACE (Bit 6) : GET_INTERFACE (Bit 5) : SET_CONFIGRATION (Bit 4) : GET_CONFIGRATION (Bit 3) : GET_DESCRIPTOR (Bit 2) : SET_FEATURE (Bit 1) : CLEAR_FEATURE (Bit 0) : GET_STATUS
3.16.3.11 Request Register This register shows the device request currently being executed. Any bit which is set to "1" shows a request currently being executed. 7
Request (07CBH) bit Symbol Read/Write Reset State
6
SOFT_RESET
5
R 0
4
R 0
3
VENDOR
2
CLASS
1
R 0
0
R 0
G_PORT_STS G_DEVICE_ID
ExSTANDARD STANDARD
R 0
R 0
R 0
SOFT_RESET G_PORT_STS G_DEVICE_ID VENDOR CLASS ExSTANDARD STANDARD
(Bit 6) : SOFT_RESET (Bit 5) : GET_PORT_STATUS (Bit 4) : GET_DEVICE_ID (Bit 3) : Vendor class request (Bit 2) : Class request (Bit 1) : Auto Bus Enumeration not supported (SET_DESCRIPTOR, SYNCH_FRAME) (Bit 0) : Standard request
92CF26A-391
2007-11-21
TMP92CF26A
3.16.3.12 DATASET Register This register shows whether FIFO contains data or not. The application program can access this register to check whether FIFO contains data or not. In the receiving status, when valid data transfer from the USB host has finished, the bit which corresponds to the corresponding endpoint is set to "1" and an interrupt generated. And, when the application reads the 1-packet data, this bit is cleared to "0". In transmit status, when it has completed the 1-packet data transfer to FIFO, this bit is set to "1". And when valid data is transferred to the USB host, this bit is cleared to "0" and an interrupt generated.
7
DATASET1 (07CCH) bit Symbol Read/Write Reset State R 0
6
R 0
5
R 0
4
R 0
3
R 0
2
R 0
1
0
EP0_DSET_A
EP3_DSET_B EP3_DSET_A EP2_DSET_B EP2_DSET_A EP1_DSET_B EP1_DSET_A
R 0
7
DATASET2 (07CDH) bit Symbol Read/Write Reset State R 0
6
R 0
5
R 0
4
R 0
3
R 0
2
R 0
1
R 0
0
R 0
EP7_DSET_B EP7_DSET_A EP6_DSET_B EP6_DSET_A EP5_DSET_B EP5_DSET_A EP4_DSET_B EP4_DSET_A
Note: DATASET1, DATASET2 registers are not used in the TMP92CF26A.
*
Single packet mode (DATASET1: Bit0, bit2, bit4 and bit6
DATASET2: Bit0, bit2, bit4 and bit6)
These bits show whether FIFO of the corresponding endpoint has data or not. In receive mode endpoint, if the corresponding endpoint bit is "1", FIFO contains data to be read. Access EPx_SIZE register, determine the size of the data that should be read, and read data of this size. When this bit is "0", there is no data to be read. In transmit mode endpoint, if the corresponding endpoint bit is "0", the CPU can transfer data under the FIFO payload. If this bit is "1", because FIFO has transfer data waiting, transfer data to FIFO from UDC after the corresponding bit has been cleared to "0". When a short-packet is transferred, access EOP register after writing transmission data to the corresponding endpoint. * Dual packet mode (DATASET1: Bit3, bit5 and bit7 DATASET2: Bit1, bit3 bit5 and bit7)
These bits become effective in the dual packet mode. FIFO has 2-packets in this mode. Each packet (packet-A and packet-B) has its own DATASET-bit. Unlike as in the case above, in isochronous transfer, this shows the packet that can access the current frame. In this case, whether bit A or B is set to "1", it is renewed according to the shifting frame.
92CF26A-392
2007-11-21
TMP92CF26A
Note1: In receive mode, if the endpoint bits corresponding to packet-A or paclet-B are "1", read the required packet-number data after checking DATASIZE. Note2: In transmit mode, if both A and B bits are not "1", this means there is space in FIFO. So, write data of payload or less to FIFO. If the transmission is short-packet, write "0" to EOP after writing data to the FIFO. The maximum size that can be written to A or B packet is the same as the maximum payload size. If both A and B bits are "0", continuous writing of double maximum payload size is available. Note3: In dual packet transmit mode, if both A and B packet are empty and EOP is written "0", the NULL-data is set to FIFO. In single mode, the NULL-data is also set to FIFO if the above operation is executed when packet-A contains no data.
92CF26A-393
2007-11-21
TMP92CF26A
3.16.3.13 EPx_STATUS Register (x: 0 to 7) These registers are status registers for each endpoint. The is common to all endpoints. 7
EP0_STATUS bit Symbol (0790H) Read/Write Reset State
6
TOGGLE
5
SUSPEND
4
STATUS[2]
3
STATUS[1]
2
STATUS[0]
1
FIFO_DISABLE
0
STAGE_ERR
R 0
R 0
R 1
R 1
R 1
R 0
R 0
7
EP1_STATUS bit Symbol (0791H) Read/Write Reset State
6
TOGGLE
5
SUSPEND
4
STATUS[2]
3
STATUS[1]
2
STATUS[0]
1
FIFO_DISABLE
0
STAGE_ERR
R 0
R 0
R 1
R 1
R 1
R 0
R 0
7
EP2_STATUS bit Symbol (0792H) Read/Write Reset State
6
TOGGLE
5
SUSPEND
4
STATUS[2]
3
STATUS[1]
2
STATUS[0]
1
FIFO_DISABLE
0
STAGE_ERR
R 0
R 0
R 1
R 1
R 1
R 0
R 0
7
EP3_STATUS bit Symbol (0793H) Read/Write Reset State
6
TOGGLE
5
SUSPEND
4
STATUS[2]
3
STATUS[1]
2
STATUS[0]
1
FIFO_DISABLE
0
STAGE_ERR
R 0
R 0
R 1
R 1
R 1
R 0
R 0
7
EP4_STATUS bit Symbol (0794H) Read/Write Reset State
6
TOGGLE
5
SUSPEND
4
STATUS[2]
3
STATUS[1]
2
STATUS[0]
1
FIFO_DISABLE
0
STAGE_ERR
R 0
R 0
R 1
R 1
R 1
R 0
R 0
7
EP5_STATUS bit Symbol (0795H) Read/Write Reset State
6
TOGGLE
5
SUSPEND
4
STATUS[2]
3
STATUS[1]
2
STATUS[0]
1
FIFO_DISABLE
0
STAGE_ERR
R 0
R 0
R 1
R 1
R 1
R 0
R 0
7
EP6_STATUS bit Symbol (0796H) Read/Write Reset State
6
TOGGLE
5
SUSPEND
4
STATUS[2]
3
STATUS[1]
2
STATUS[0]
1
FIFO_DISABLE
0
STAGE_ERR
R 0
R 0
R 1
R 1
R 1
R 0
R 0
7
EP7_STATUS bit Symbol (0797H) Read/Write Reset State
6
TOGGLE
5
SUSPEND
4
STATUS[2]
3
STATUS[1]
2
STATUS[0]
1
FIFO_DISABLE
0
STAGE_ERR
R 0
R 0
R 1
R 1
R 1
R 0
R 0
Note: EP4, 5, 6 and 7_STATUS registers are not used in the TMP92CF26A.
TOGGLE Bit (Bit6)
0: TOGGLE 1: TOGGLE Bit0 Bit1
This bit shows status of toggle sequence bit.
SUSPEND (Bit5)
0: RESUME 1: SUSPEND
This bit shows status of UDC power management. In the SUSPEND status, access to UDC is limited. For details, refer to 3.16.9.
92CF26A-394
2007-11-21
TMP92CF26A
STATUS [2:0] (Bit4 to bit2)
These bits show status of UDC endpoint. The status shows whether transfer is possible or not, and the result of the transfer. . These depend on transfer type. (For the Isochronous transfer type, refer to 3.16.9.)
000: READY
Receiving:
Device can be received. In endpoints 1 to 7, this register is initialized to "READY" by setting transfer type at SET_CONFIGURATION. In endpoint 0, this register is initialized to "READY" by detecting USB reset from the host. This is initialized to "READY" by terminating the status stage without error.
Transmitting:
Basically, the same as with "Receiving". But in transmitting, when data for transmission is set to FIFO and answer to token from host and transfer data to host collect and received ACK, status register does not change, and it remains "READY". In this case, EPx_Empty_A or EPx_Empty_B interrupt terminates the transfer correctly.
001: DATAIN
UDC set to DATAIN and generates EPx_FULL_A or EPx_FULL_B interrupt when data is received from the host without error. Refer to 3.16.8 (2) Details for the STATUS register. After transfer of data to IN token from host, UDC sets TX-ER to status register when "ACK" is not received from host. In this case, an interrupt is not generated. The hosts re-try IN token transfer. UDC sets RX_ERR to status register without transmitting "ACK" to host when an error (such as a CRC-error) is detected in data of received token. In this case, an interrupt is not generated. The hosts re-try and IN token transfer. This status is used only for the control transfer type and it is set when a status-stage token is received from the host after a terminated data-stage. When status-stage can be finished, terminates correctly and returns to READY. This is not used in the Bulk and interrupts transfer type.
010: FULL 011: TX_ERR
100: RX_ERR
101: BUSY
110: STALL
This status shows that the corresponding endpoint is in STALL status. In this status, STALL-handshake returns, except for SETUP-token. The control endpoint returns to READY from stall condition when SETUP-token is received. Other endpoints return to READY when initialization command of FIFO is received. (Note) With Automatic Set_Interface request answer, requests to interface 4 to 6 may not become to request errors. If this is a problem, in Set_Interface request answer, set Standard Request Mode to "1" and use software.
111: INVALID
This status shows that the corresponding endpoint is in UNCONFIGURED status. In this status, the UDC has no effect when a token is received from the host. On reset, all endpoints are set to INVALID status. Only endpoint 0 returns to READY on receiving USB-reset. Corresponding endpoints return to READY by according to configuration.
92CF26A-395
2007-11-21
TMP92CF26A
FIFO_DISABLE (Bit1)
0: FIFO enabled 1: FIFO disabled
This bit symbol shows FIFO status except for EP0. If the FIFO is set to disabled, the UDC transmits NAK handshake for all transfers. Disabled or enabled status is set the COMMAND register. This bit is cleared to "0" when transfer type is changed. This bit symbol shows that the status stage has not been terminated correctly. ERROR is set when a status stage is not terminated correctly and a new SETUP token is received. When this bit is "1", this bit is cleared to "0" by read EP0_STATUS register. This bit is not cleared even if normal control transfer or other transfer is executed after. To clear, read this bit. When software transaction is finished and UDC writes EOP register, UDC shifts to status register and waits termination of status stage. In this case, if software is needed to confirm that the status stage has been terminated correctly, when a new request flag is received, it is possible to confirm whether or not the last request has been terminated correctly. It can also be confirmed, when a new request flag is asserted, whether or not the last request has been cancelled before completion.
STAGE_ERROR (Bit0)
0: SUCCESS 1: ERROR
92CF26A-396
2007-11-21
TMP92CF26A
3.16.3.14 EPx_SIZE Register (x: 0 to 7) These registers have the following functions. a) In receive mode, showing the 1-packet data number which has been received correctly. b) In the transmit mode, showing payload size. Showing length value when short packet is transferred. It is not necessary to read this register when it is transmitting. c) Showing dual packet mode and currently effective packet. Each endpoint has an H (High)-register that shows upper bit 9 to bit7 of data size and an L (Low) register which shows lower bit 6 to bit0 and control bit of FIFO. Each H/L register also has 2-set for dual-packet mode. On reset, these are initialized to maximum payload size. 7
EP0_SIZE_L_A bit Symbol PKT_ACTIVE
6
DATASIZE6
5
DATASIZE5
4
DATASIZE4
3
DATASIZE3
2
DATASIZE2
1
DATASIZE1
0
DATASIZE0
(0798H)
Read/Write Reset State
R 1
R 0
R 0
R 0
R 1
R 0
R 0
R 0
7
EP1_SIZE_L_A bit Symbol PKT_ACTIVE
6
DATASIZE6
5
DATASIZE5
4
DATASIZE4
3
DATASIZE3
2
DATASIZE2
1
DATASIZE1
0
DATASIZE0
(0799H)
Read/Write Reset State
R 1
R 0
R 0
R 0
R 1
R 0
R 0
R 0
7
EP2_SIZE_L_A bit Symbol PKT_ACTIVE
6
DATASIZE6
5
DATASIZE5
4
DATASIZE4
3
DATASIZE3
2
DATASIZE2
1
DATASIZE1
0
DATASIZE0
(079AH)
Read/Write Reset State
R 1
R 0
R 0
R 0
R 1
R 0
R 0
R 0
7
EP3_SIZE_L_A bit Symbol PKT_ACTIVE
6
DATASIZE6
5
DATASIZE5
4
DATASIZE4
3
DATASIZE3
2
DATASIZE2
1
DATASIZE1
0
DATASIZE0
(079BH)
Read/Write Reset State
R 1
R 0
R 0
R 0
R 1
R 0
R 0
R 0
7
EP4_SIZE_L_A bit Symbol PKT_ACTIVE
6
DATASIZE6
5
DATASIZE5
4
DATASIZE4
3
DATASIZE3
2
DATASIZE2
1
DATASIZE1
0
DATASIZE0
(079CH)
Read/Write Reset State
R 1
R 0
R 0
R 0
R 1
R 0
R 0
R 0
7
EP5_SIZE_L_A bit Symbol PKT_ACTIVE
6
DATASIZE6
5
DATASIZE5
4
DATASIZE4
3
DATASIZE3
2
DATASIZE2
1
DATASIZE1
0
DATASIZE0
(079DH)
Read/Write Reset State
R 1
R 0
R 0
R 0
R 1
R 0
R 0
R 0
7
EP6_SIZE_L_A bit Symbol PKT_ACTIVE
6
DATASIZE6
5
DATASIZE5
4
DATASIZE4
3
DATASIZE3
2
DATASIZE2
1
DATASIZE1
0
DATASIZE0
(079EH)
Read/Write Reset State
R 1
R 0
R 0
R 0
R 1
R 0
R 0
R 0
7
EP7_SIZE_L_A bit Symbol PKT_ACTIVE
6
DATASIZE6
5
DATASIZE5
4
DATASIZE4
3
DATASIZE3
2
DATASIZE2
1
DATASIZE1
0
DATASIZE0
(079FH)
Read/Write Reset State
R 1
R 0
R 0
R 0
R 1
R 0
R 0
R 0
Note: EP4,5,6,7_SIZE_L_A registers are not used in the TMP92CF26A.
92CF26A-397
2007-11-21
TMP92CF26A
7
EP1_SIZE_L_B
6
5
4
3
2
R 0
1
R 0
0
R 0
bit Symbol Read/Write Reset State
DATASIZE9 DATASIZE8 DATASIZE7
(07A1H)
7
EP2_SIZE_L_B
6
5
4
3
2
R 0
1
R 0
0
R 0
bit Symbol Read/Write Reset State
DATASIZE9 DATASIZE8 DATASIZE7
(07A2H)
7
EP3_SIZE_L_B
6
5
4
3
2
R 0
1
R 0
0
R 0
bit Symbol Read/Write Reset State
DATASIZE9 DATASIZE8 DATASIZE7
(07A3H)
7
EP4_SIZE_L_B
6
5
4
3
2
R 0
1
R 0
0
R 0
bit Symbol Read/Write Reset State
DATASIZE9 DATASIZE8 DATASIZE7
(07A4H)
7
EP5_SIZE_L_B
6
5
4
3
2
R 0
1
R 0
0
R 0
bit Symbol Read/Write Reset State
DATASIZE9 DATASIZE8 DATASIZE7
(07A5H)
7
EP6_SIZE_L_B
6
5
4
3
2
R 0
1
R 0
0
R 0
bit Symbol Read/Write Reset State
DATASIZE9 DATASIZE8 DATASIZE7
(07A6H)
7
EP7_SIZE_L_B
6
5
4
3
2
R 0
1
R 0
0
R 0
bit Symbol Read/Write Reset State Note EP3,4,5,6,7_SIZE_L_B registers are not used in the TMP92CF26A.
DATASIZE9 DATASIZE8 DATASIZE7
(07A7H)
92CF26A-398
2007-11-21
TMP92CF26A
7
EP1_SIZE_H_A bit Symbol
6
5
4
3
2
R 0
1
R 0
0
R 0
DATASIZE9 DATASIZE8 DATASIZE7
(07A9H)
Read/Write Reset State
7
EP2_SIZE_H_A bit Symbol
6
5
4
3
2
R 0
1
R 0
0
R 0
DATASIZE9 DATASIZE8 DATASIZE7
(07AAH)
Read/Write Reset State
7
EP3_SIZE_H_A bit Symbol
6
5
4
3
2
R 0
1
R 0
0
R 0
DATASIZE9 DATASIZE8 DATASIZE7
(07ABH)
Read/Write Reset State
7
EP4_SIZE_H_A bit Symbol
6
5
4
3
2
R 0
1
R 0
0
R 0
DATASIZE9 DATASIZE8 DATASIZE7
(07ACH)
Read/Write Reset State
7
EP5_SIZE_H_A bit Symbol
6
5
4
3
2
R 0
1
R 0
0
R 0
DATASIZE9 DATASIZE8 DATASIZE7
(07ADH)
Read/Write Reset State
7
EP6_SIZE_H_A bit Symbol
6
5
4
3
2
R 0
1
R 0
0
R 0
DATASIZE9 DATASIZE8 DATASIZE7
(07AEH)
Read/Write Reset State
7
EP7_SIZE_H_A bit Symbol
6
5
4
3
2
R 0
1
R 0
0
R 0
DATASIZE9 DATASIZE8 DATASIZE7
(07AFH)
Read/Write Reset State Note EP4,5,6,7_SIZE_H_A registers are not used in the TMP92CF26A.
92CF26A-399
2007-11-21
TMP92CF26A
7
EP1_SIZE_H_B
6
5
4
3
2
DATASIZE9
1
DATASIZE8
0
DATASIZE7
bit Symbol Read/Write Reset State
(07B1H)
R 0
R 0
R 0
7
EP2_SIZE_H_B
6
5
4
3
2
DATASIZE9
1
DATASIZE8
0
DATASIZE7
bit Symbol Read/Write Reset State
(07B2H)
R 0
R 0
R 0
7
EP3_SIZE_H_B
6
5
4
3
2
DATASIZE9
1
DATASIZE8
0
DATASIZE7
bit Symbol Read/Write Reset State
(07B3H)
R 0
R 0
R 0
7
EP4_SIZE_H_B
6
5
4
3
2
DATASIZE9
1
DATASIZE8
0
DATASIZE7
bit Symbol Read/Write Reset State
(07B4H)
R 0
R 0
R 0
7
EP5_SIZE_H_B
6
5
4
3
2
DATASIZE9
1
DATASIZE8
0
DATASIZE7
bit Symbol Read/Write Reset State
(07B4H)
R 0
R 0
R 0
7
EP6_SIZE_H_B
6
5
4
3
2
DATASIZE9
1
DATASIZE8
0
DATASIZE7
bit Symbol Read/Write Reset State
(07B6H)
R 0
R 0
R 0
7
EP7_SIZE_H_B
6
5
4
3
2
DATASIZE9
1
DATASIZE8
0
DATASIZE7
bit Symbol Read/Write Reset State Note EP3,4,5,6,7_SIZE_H_B registers are not used in the TMP92CF26A.
(07B7H)
R 0
R 0
R 0
DATASIZE[9:7] (H register: Bit2 to bit0) DATASIZE[6:0] (L register: Bit6 to bit0) In receiving, the data number of the 1 packet received from the host is shown. This is renewed when data from the host is received with no error. When dual-packet mode is selected, this bit show the packet that can be accessed. In this case, the UDC accesses packets that divide FIFO (Packet A and Packet B) mutually. When FIFO in UDC is accessed by CPU, refer to this bit. If receiving endpoint, start reading from that packet that this bit is "1". In single-packet mode, this bit has no effect because packet-A is always used.
PKT_ACTIVE (L register: Bit7)
1: OUT_ENABLE 0: OUT_DISABLE
92CF26A-400
2007-11-21
TMP92CF26A
3.16.3.15 FRAME Register This register shows the frame number which is issued with SOF token from the host and is used for Isochronous transfer type. Each HIGH and LOW register shows upper and lower bits. 7
FRAME_L (07E1H) bit Symbol Read/Write Reset State - R 0
6
T[6] R 0
5
T[5] R 0
4
T[4] R 0
3
T[3] R 0
2
T[2] R 0
1
T[1] R 0
0
T[0] R 0
7
FRAME_H bit Symbol (07E2H) Read/Write Reset State
T[10]
6
T[9]
5
T[8]
4
T[7]
3
2
CREATE
1
R 1
0
R 0
FRAME_STS1 FRAME_STS0
R 0
R 0
R 0
R 0
R 0
T[10:7] (H register: Bit7 to bit4) T[6:0] (L register: Bit6 to bit0) CREATE (H register: Bit2)
0: DISABLE 1: ENABLE
These bits are renewed when SOF-token is received. They also shows the frame-number. These bits show whether the function that generates SOF automatically from the UDC is enabled or not. This is used in case of error in receiving SOF token. This function is set by accessing COMMAND register. On reset, this bit is initialized to "0".
FRAME STS[1:0] (H register: Bit1 and bit0)
0: BEFORE 1: VALID 2: LOST
These bits show the status whether a frame number that is shown in the FRAME register is correct or not. At the LOST status, a correct frame number is undefined. If this register is "VALID", the number that is shown to the FRAME register is correct. If this register is "BEFORE", during SOF auto generation, BEFORE condition shows it from USB host controller inside that from SOF generation time to reception of SOF token. Correct frame-number value is the value that is selected from FRAME register value.
3.16.3.16 ADDRESS Register This register shows the device address which is specified by the host in bus enumeration. By reading this register, the present address can be confirmed. 7
ADDRESS (07E3H) bit Symbol Read/Write Reset State
6
A6 R 0
5
A5 R 0
4
A4 R 0
3
A3 R 0
2
A2 R 0
1
A1 R 0
0
A0 R 0
ADDRESS [6:0] (Bit6 to bit0)
The UDC compares this registers and address in all packet ID, and UDC judges whether it is an effective transaction or not. This is initialized to "00H" by USB reset.
92CF26A-401
2007-11-21
TMP92CF26A
3.16.3.17 EOP Register This register is used when a control transfer type dataphase terminates or when a short packet is transmitting bulk-IN or interrupt-IN. 7
EOP (07CFH) bit Symbol Read/Write Reset State
EP7_EOPB
6
EP6_EOPB
5
EP5_EOPB
4
EP4_EOPB
3
EP3_EOPB
2
EP2_EOPB
1
EP1_EOPB
0
EP0_EOPB
W 1
W 1
W 1
W 1
W 1
W 1
W 1
W 1
Note: EOP registers are not used in the TMP92CF26A.
In a control transfer type dataphase, write "0" to when all transmission data is written to the FIFO, or read all receiving data from the FIFO. The UDC terminates its status stage on this signal. When a short packet is transmitted by using bulk-IN or interrupt-IN endpoint, use this to terminate writing of transmission data. In this case, write "0" to of writing endpoint. Write "1" to other bits.
92CF26A-402
2007-11-21
TMP92CF26A
3.16.3.18 Port Status Register This register is used when a request of printer class request is received. In the case of a GET_PORT_STATUS request, the UDC operates automatically using this data. 7
Port Status (07E0H) bit Symbol Read/Write Reset State Reserved7 W 0
6
Reserved6 W 0
5
PaperError W 0
4
Select W 1
3
NotError W 1
2
Reserved2 W 0
1
Reserved1 W 0
0
Reserved0 W 0
Note: The TMP92CF26A doed not use this register since not support printer-class.
The data should be written before receiving request. Write "0" to the bit of this register. This register is initialized to "18H" on reset. 3.16.3.19 Standard Request Mode Register This register sets the answer for Standard Request either answering automatically in hardware, or by control through software. Each bit represents a kind of request. When the relevant bit in this register is set to "0", the answer is executed automatically by hardware. When the relevant bit in this register is set to "1", the answer is controlled by software. If a request is received during hardware control, the interrupt signal (INT_SETUP, INT_EP0, INT_STAS, INT_STAN) is set to disable. If a request is received during software control, the interrupt signal is asserted, and it is controlled by software. 7
Standard Request Mode
6
G_Interface
5
S_Config
4
G_Config
3
G_Descript
2
S_Feature
1
C_Feature
0
G_Status
bit Symbol Read/Write Reset State
S_Interface
(07D8H)
R/W 0
R/W 0
R/W 0
R/W 0
R/W 0
R/W 0
R/W 0
R/W 0
S_Intetface G_Interface S_Config G_Config G_Descript S_Feature C_Feature G_Status
(Bit 7) : SET_INTERFACE (Bit 6) : GET_INTERFACE (Bit 5) : SET_CONFIGRATION (Bit 4) : GET_CONFIGRATION (Bit 3) : GET_DESCRIPTOR (Bit 2) : SET_FEATURE (Bit 1) : CLEAR_FEATURE (Bit 0) : GET_STATUS
92CF26A-403
2007-11-21
TMP92CF26A
3.16.3.20 Request Mode Register This register sets the answer for Class Request either automatically in hardware or by control through software. Each bit represents a kind of request. When relevant bit in this register is set to "0", the answer is executed automatically by hardware. When relevant bit in this register is set to "1", the answer is controlled by software. If request is received during hardware control, interrupt signal (INT_SETUP, INT_EP0, INT_STAS, INT_STATUSN) is set to disable. If a request is received during software control, the interrupt signal is asserted, and it is controlled by software. 7
Request Mode
6
Soft_Reset R/W 0
5
G_Port_Sts R/W 0
4
G_DeviceId R/W 0
3
2
1
0
bit Symbol Read/Write Reset State
(07D9H)
Note: the TMP92CF26A doed not use this register since it does not support printer-class.
Soft_Reset G_Port_Sts G_Config G_Descript
(Bit 7) : Reserved (Bit 6) : SOFT_RESET (Bit 5) : GET_PORT_STATUS (Bit 4) : GET_DEVICE_ID (Bit 3 to 0) : Reserved
Note1: SET_ADDRESS request is supported only by auto-answer . Note2: SET_DESCRIPTOR and SYNCH_FRAME are controlled only by software . Note3: Vendor Request and Class Request (Printer Class and so on) are controlled only by software. Note4: INT_SETUP, EP0, STAS and STASN interrupts assert only when it is software-control.
92CF26A-404
2007-11-21
TMP92CF26A
3.16.3.21 COMMAND Register This register sets COMMAND at each endpoint. This register can be set to select of endpoint in bit6 to bit4 and kind of COMMAND in bit3 to bit0. COMMAND for endpoint that is supported is ignored. 7
COMMAND bit Symbol (07D0H) Read/Write Reset State
6
EP[2]
5
EP[1]
4
EP[0]
3
Command[3]
2
Command[2]
1
Command[1]
0
Command[0]
W 0
W 0
W 0
W 0
W 0
W 0
W 0
Note: When writing to this register, a recovery time of 3clock at 12MHz is needed. If writing continuously, insert dummy instruction of more than 250 ns.
EP [2:0] (Bit6 to bit4)
000: Select endpoint 0 001: Select endpoint 1 010: Select endpoint 2 011: Select endpoint 3
COMMAND [3:0] (Bit3 to bit0)
0000: Reserved 0001: Reserved 0010: SET_DATA0 This COMMAND clear toggle sequence bit of corresponding endpoint (EP0 to EP3). If this COMMAND is input, it sets toggle sequence bit of the corresponding endpoint to "0". Data toggle for transfer is renewed automatically by UDC. However, this COMMAND execution is required if setting toggle sequence bit of endpoint to "0".If control transfer type and Isochronous transfer type, execution of this COMMAND is not required because of hardware control. 0011: RESET This COMMAND resets the corresponding endpoint (EP0 to EP3). If this COMMAND is input, the corresponding endpoint is initialized. CLEAR_FEATURE request stalls endpoint. When this stall is cleared, execute this COMMAND. (This command does not affect transfer mode.) This command initializes the following. Clear toggle sequence bit of corresponding endpoint. Clear STALL of corresponding endpoint. Set to FIFO_ENABLE condition. 0100: STALL This COMMAND sets corresponding endpoint to STALL (EP0 to EP3). If STALL handshake must be return as answer for device request, execute this command. 0101: INVALID This COMMAND sets condition to prohibition of use corresponding endpoint (EP1 to EP3). If UDC detects USB_RESET signal from USB host, it sets all endpoints (except endpoint 0) to prohibition using it automatically. If Config and Interface are changed by device request, set endpoint that is not used to prohibit use. 0110: CREATE_SOF This COMMAND sets quasi-SOF generation function to enable (EP0). Default is set to disable, it must be used for Isochronous transfer. 0111: FIFO_DISABLE This COMMAND sets FIFO of corresponding endpoint to disable (EP1 to EP3). If this command is set from external, all of transfers for corresponding endpoint return NAK. When it is set externally while receiving packet, this becomes valid from next token. This command does not affect the packet that is transferring.
92CF26A-405
2007-11-21
TMP92CF26A
1000: FIFO_ENABLE
This COMMAND sets FIFO of corresponding endpoint to enable (EP1 to EP3). If FIFO is set to disable by FIFO_DISABLE COMMAND, this command is used for release of disable condition. If set while receiving packet, this becomes valid from next token. If USB_RESET is detected from host and RESET COMMAND execute and transfer mode is set by using SET_CONFIG and SET_INTERFACE request, the corresponding endpoint enters FIFO_ENABLE condition.
1001: INIT_DESCRIPTOR
This COMMAND is used if descriptor RAM is rewritten during system operation (EP0). If UDC detects USB_RESET from host controller, it reads content of descriptor RAM automatically, and it performs relevant settings. If descriptor RAM is changed during system operation, it must read setting again. Therefore, execute this command. When connected to USB host, this function starts reading automatically. Therefore, in this case, it is not necessary to execute this command.
1010: FIFO_CLEA
This COMMAND initializes FIFO of corresponding endpoint (EP1 to EP3). However, EPx_STATUS is not initialized. If resetting by software, execute this COMMAND. This command Initializes the following item. Clear STALL of relevant endpoint. Set to FIFO_ENABLE condition.
1011: STAL_CLEAR
This COMMAND clear STALL of corresponding endpoint (EP1 to EP3). If clearing only STALL of endpoint, execute this COMMAND.
92CF26A-406
2007-11-21
TMP92CF26A
3.16.3.22 INT_Control Register INT_STASN interrupt is disabled and enabled by the value that is written to this register. This is initialized to disable by external reset. When setup packet is received, it becomes disabled. 7
INT_Control bit Symbol (07D6H) Read/Write Reset State
6
5
4
3
2
1
0
Status_nak R/W 0
In control read transfer, if the host terminates a dataphase with small data length (smaller than the data length that is specified by the host as wLength), the device side and stage management cannot be synchronized. Therefore, INT_STASN interrupt signals this shift to status stage. If this interrupt is not required, it can set to disable because this interrupt is asserted at every status stage. STATUS_NAK (Bit0)
0: INT_STATSN interrupt disable 1: INT_STATSN interrupt enable
3.16.3.23 USB STATE Register This register shows the current device state for connection with USB host. 7
USB STATE bit Symbol (07CEH) Read/Write Reset State
6
5
4
3
2
Configured R/W 0
1
Addressed R 0
0
Default R 1
Inside the UDC, the answer for each Device Request is managed by referring to these bits (Configured, Addressed and Default). If transaction for SET_CONFIG request is executed by using software, write the present state to this register. If host appointconfig is 0, this becomes Unconfigured, and it is necessary to return to Addressed state. Therefore, if host appoint config is 0, write "0" to bit2. When Configured bit (Bit2) is written "0", Addressed bit (bit 1) is set automatically by hardware. When host appoint config value that supported by device, device must execute mode setting for each endpoint by using the value that is appointed by endpoint-descriptor in the config-descriptor. After finish mode setting, set Configured bit (Bit2) to "1" before accessing EOP register. When this bit is set to "1", Addressed bit (Bit1) is set to "0" automatically.
Bit2 to bit0
000: Default 010: Addressed 100: Configured
92CF26A-407
2007-11-21
TMP92CF26A
3.16.3.24 EPx_MODE Register (x: 1 to 3) This register sets transfer mode of endpoint (EP1 to EP3). If SET_CONFIG and SET_INTERFACE processing is set to software control, this control must use appointed config or interface. Access this register to set mode. 7
EP1_MODE bit Symbol (0789H) Read/Write Reset State
6
5
Payload[2] R/W 0
4
Payload[1] R/W 0
3
Payload[0] R/W 0
2
Mode[1] R/W 0
1
Mode[0] R/W 0
0
Direction R/W 0
7
EP2_MODE bit Symbol (078AH) Read/Write Reset State
6
5
Payload[2] R/W 0
4
Payload[1] R/W 0
3
Payload[0] R/W 0
2
Mode[1] R/W 0
1
Mode[0] R/W 0
0
Direction R/W 0
7
EP3_MODE bit Symbol (078BH) Read/Write Reset State
6
5
Payload[2] R/W 0
4
Payload[1] R/W 0
3
Payload[0] R/W 0
2
Mode[1] R/W 0
1
Mode[0] R/W 0
0
Direction R/W 0
There is a limitation to the timing that can be written. If transaction for SET_CONFIG and SET_INTERFACE processing is set to software control, after INT_SETUP interrupt is received, finish writing before accessing EOP register. This register prohibits writing when it is other timing, and it is ignored. DIRECTION (Bit0)
0: OUT 1: IN Direction from host to device Direction from device to host
MODE [1:0] (Bit2 and bit1)
00: Control transfer type 01: Isochronous transfer type 10: Bulk transfer type or interrupt transfer type 11: Interrupt (No toggle) Note: If setting endpoint that is set to Isochronous transfer mode to "no use", after changing to Isochronous mode, set to "no use" by COMMAND register.
PAYLOAD [2:0] (Bit3, bit4 and bit5)
000: 001: 010: 011: 8 bytes 16 bytes 32 bytes 64 bytes
0100:128 bytes 0101:256 bytes 0110:512 bytes 0111:1023 bytes (Note1, 2) Note1: Max packet size of Isochronous transfer type is 1023 bytes. Note2: If wMaxPacketSize of descriptor has been set to other than 8, 16, ..., 1023, Payload more than descriptor value is set by auto-answer of Set_Configration and Set_Interface.
Others (Bit6 and bit7) Reserved
92CF26A-408
2007-11-21
TMP92CF26A
3.16.3.25 EPx_SINGLE Register This register sets mode of FIFO in each endpoint (SINGLE/DUAL). 7
EPx_SINGLE1 bit Symbol (07D1H) Read/Write Reset State R/W 0
6
R/W 0
5
R/W 0
4
3
R/W 0
2
R/W 0
1
R/W 0
0
EP3_SELECT EP2_SELECT EP1_SELECT
EP3_SINGLE EP2_SINGLE EP1_SINGLE
Note: Endpoint 3 support only SINGLE mode in the TMP92CF26A. Bit number 0: No use 1: EP1_SINGLE 2: EP2_SINGLE 3: EP3_SINGLE 4: No use 5: EP1_SELECT 6: EP2_SELECT 7: EP3_SELECT When EPx_SELECT bit is "1", EPx_SINGLE bit becomes valid in the following content. 0: DUAL mode 0: Invalid 1: SINGLE mode 1: Valid If setting content of EPx_SINGLE bit to valid, set EPx_SELECT bit to "1".
3.16.3.26 EPx_BCS Register This register sets mode of access to FIFO in each endpoint. 7
EPx_BCS1 (07D3H) bit Symbol Read/Write Reset State Bit number 0: No use 1: EP1_BCS 2: EP2_BCS 3: EP3_BCS 4: No use 5: EP1_SELECT 6: EP2_SELECT 7: EP3_SELECT Always write "1" to EPx_BCS bit. 0: Reserved 0: Invalid 1: CPU access 1: Valid If setting content of EPx_BCS bit to valid, set EPx_SELECT bit to "1". R/W 0
6
R/W 0
5
R/W 0
4
3
EP3_BCS
2
EP2_BCS
1
EP1_BCS
0
EP3_SELECT EP2_SELECT EP1_SELECT
R/W 0
R/W 0
R/W 0
92CF26A-409
2007-11-21
TMP92CF26A
3.16.3.27 USBREADY Register This register informs finishing writing data to descriptor RAM on UDC. After assigned data to descriptor RAM, write "0" to bit0. 7
USBREADY bit Symbol (07E6H) Read/Write Reset State
6
5
4
3
2
1
0
USBREADY R/W 0
USBREADY (Bit0)
0: Writing to descriptor RAM has finished. 1: Writing to descriptor RAM is enabled. (However, writing to descriptor RAM is prohibited when connected to host.)
USB host VCC GND VSS
TMP92CF26A
CPU
PortXX R1 = 1.5 k D+ 15 k R2 D- 15 k R3 UDC
VDD INTXX PortXX (Pull-up on/off) Write signal Descriptor RAM access Device ID RAM Register in USB USBREADY registera access
Detect level of VDD signal from USB cable, and execute initialize sequence. In this case, UDC disable detecting USB_RESET signal until USBREADY register is written "0" after release of USB_RESET. If the pull-up resistor on D+ signal is controlled by control signal, when pull-up resistor is connected to host in OFF condition, this condition is equivalent condition with USB_RESET signal by pull-down resistor on the host side. Therefore UDC is not detected in USB_RESET until "0" is written to USBREADY register
Note1: External pull-up resistor and control switch are needed with the TMP92CF26A. Note2: The above setting is an example for when communication. A specific circuit is required to prevent cullent flow at connector detection , no-use, and no connection.
92CF26A-410
2007-11-21
TMP92CF26A
3.16.3.28 Set Descriptor STALL Register This register sets whether returns STALL automatically in data stage or status stage for Set Descriptor Request. 7
Set Descriptor STALL (07E8H)
6
5
4
3
2
1
0
S_D_STALL W 0
bit Symbol Read/Write Reset State
Bit0: S_D_STALL
0: Software control (Default) 1: Automatically STALL
3.16.3.29 Descriptor RAM Register This register is used for store descriptor to RAM. The size of the descriptor is 384 bytes. However, when storing descriptor, write according to descriptor RAM structure sample. 7
Descriptor RAM bit Symbol (0500H) (067FH)
6
D6 R/W Undefined
5
D5 R/W Undefined
4
D4 R/W Undefined
3
D3 R/W Undefined
2
D2 R/W Undefined
1
D1 R/W Undefined
0
D0 R/W Undefined
D7 R/W Undefined
Read/Write Reset State
~
Read/Write timing is only possible before detection of USB_RESET or during processing of SET_DESCRIPTOR request. SET_DESCRIPTOR request processes from INT_SETUP assert until access of EOP register. If there is rewriting request of descriptor in SET_DESCRIPTOR, process the request in the following sequence. 1) 2) 3) 4) 5) Read every packet of the descriptor that is transferred by SET_DESCRIPTOR requests every packet. When reading descriptor number of last packet finished, write all descriptors to RAM for descriptor. When writing is completed, execute INIT_DESCRIPTOR of COMMAND register. When all the process is completed, access EOP register, and finish status stage. When INT_STAS is received, it shows normal finish of status stage.
If USB_RESET is detected, it starts reading automatically. Therefore, when it connect to the host, executing INIT_DESCRIPTOR command is not necessary.
92CF26A-411
2007-11-21
TMP92CF26A 3.16.4 Descriptor RAM
This area stores the descriptor that is defined in USB. Device, Config, Interface, Endpoint and String descriptor must set to RAM using the following format.
Device descriptor 18 bytes
Config 1 descriptor (Interfaces, endpoints) Under 255 bytes
Config 2 descriptor (Interfaces, ENDPOINT) Under 255 bytes String0 length String1 length String2 length String3 length String0 descriptor Under 63 bytes String1 descriptor Under 63 bytes String2 descriptor Under 63 bytes String3 descriptor Under 63 bytes 1 byte 1 byte 1 byte 1 byte
Note 1: If String Descriptor is supported, set StringxLength area to size0. No support String Dedcriptor is returned STALL. Note 2: Config Descriptior refers to descriptor sample. Note 3: Sequencer in UDC determines Config number, Interface number and Endpoint number. Therefore, if supporting Endpoint number is small, assign address according to priority. Note 4: This function become effective only in case of store descriptor as RAM. Note 5: RAM size is total 384 bytes. Note 6: Possible timing in RD/WR of descriptor RAM is only before detection of USB_RESET and processing of SET_DESCRIPTOR request. (Prohibit access other than this timing.) Writing must finish before connection to USB host and processing of SET_DESCRIPTOR request. SET_DESCRIPTOR request processes from INT_SETUP assert until access of EOP register.
92CF26A-412
2007-11-21
TMP92CF26A
Descriptor RAM setting example:
Address
500H 501H 502H 503H 504H 505H 506H 507H 508H 509H 50AH 50BH 50CH 50DH 50EH 50FH 510H 511H 512H 513H 514H 515H 516H 517H 518H 519H 51AH 51BH 51CH 51DH 51EH 51FH 520H 521H 522H 523H 524H 525H 526H 527H 528H 529H 52AH
Data
12H 01H 00H 01H 00H 00H 00H 08H 6CH 04H 01H 10H 00H 01H 00H 00H 00H 01H 09H 02H 4EH 00H 01H 01H 00H A0H 31H 09H 04H 00H 00H 01H 07H 01H 01H 00H 07H 05H 01H 02H 40H 00H 00H bLength
Description
Description
Device Descriptor bDescriptorType bcdUSB (L) bcdUSB (H) bDeviceClass bDeviceSubClass bDeviceProtocol bMaxPacketSize0 bVendor (L) bVendor (H) IdProduct (L) IdProduct (H) bcdDevice (L) bcdDevice (H) bManufacture IProduct bSerialNumber bNumConfiguration BLength bDescriptorType wtotalLength (L) wtotalLength (H) bNumInterfaces bConfigurationValue iConfiguration bmAttributes MaxPower bLength bDescriptorType bInterfaceNumber bAlternateSetting bNumEndpoint bInterfaceClass bInterfaceSubClass bInterfaceProtocol iInterface bLength bDescriptorType bEndpointAddress bmAttributes wMaxPacketSize (L) wMaxPacketSize (H) bInterval Endpoint Descriptor OUT BULK 64 bytes AlternateSetting0 Interface Descriptor Bus-powered-remote wakeup 98 mA Config Descriptor 78 bytes Release 1.00 Toshiba Device Descriptor USB Spec 1.00 IFC's specify own
Config1 Descriptor
Interface0 Descriptor AlternateSetting0
Endpoint1 Descriptor
92CF26A-413
2007-11-21
TMP92CF26A
Address
52BH 52CH 52DH 52EH 52FH 530H 531H 532H 533H 534H 535H 536H 537H 538H 539H 53AH 53BH 53CH 53DH 53EH 53FH 540H 541H 542H 543H 544H 545H 546H 547H 548H 549H 54AH 54BH 54CH 54DH 54EH 54FH 550H 551H 552H 553H 554H 555H 556H 557H 558H
Data
09H 04H 00H 01H 02H 07H 01H 02H 00H 07H 05H 01H 02H 40H 00H 00H 07H 05H 82H 02H 40H 00H 00H 09H 04H 00H 02H 03H FFH 00H FFH 00H 07H 05H 01H 02H 40H 00H 00H 07H 05H 82H 02H 40H 00H 00H bLength
Description
Description
Interface0 Descriptor AlternateSetting1 bDescriptorType bInterfaceNumber bAlternateSetting bNumEndpoints bInterfaceClass bInterfaceSubClass bInterfaceProtocol iInterface bLength bDescriptorType bEndpointAddress bmAttributes wMaxPacketSize (L) wMaxPacketSize (H) bInterval bLength bDescriptorType bEndpointAddress bmAttributes wMaxPacketSize (L) wMaxPacketSize (H) bInterval bLength bDescriptorType bInterfaceNumber bAlternateSetting bNumEndpoints bInterfaceClass bInterfaceSubClass bInterfaceProtocol iInterface bLength bDescriptorType bEndpointAddress bmAttributes wMaxPacketSize (L) wMaxPacketSize (H) bInterval bLength bDescriptorType bEndpointAddress bmAttributes wMaxPacketSize (L) wMaxPacketSize (H) bInterval Endpoint Descriptor IN BULK 64 bytes Endpoint Descriptor OUT BULK 64 bytes AlternateSetting2 Interface Descriptor Endpoint Descriptor IN BULK 64 bytes Endpoint Descriptor OUT BULK 64 bytes AlternateSetting1 Interface Descriptor
Endoint1 Descriptor
Endpoint2 Descriptor
Interface0 Descriptor AlternateSetting2
Endpoint1 Descriptor
Endpoint2 Descriptor
92CF26A-414
2007-11-21
TMP92CF26A
Address
559H 55AH 55BH 55CH 55DH 55EH 55FH 560H 561H 562H 563H 564H 565H 566H 567H 568H 569H 56AH 56BH 56CH 56DH 56EH 56FH 570H 571H 572H 573H 574H 575H 576H 577H
DATA
07H 05H 83H 03H 08H 00H 01H 04H 10H 00H 00H 04H 03H 09H 04H 10H 03H 00H 54H 00H 6FH 00H 73H 00H 68H 00H 69H 00H 62H 00H 61H bLength
Description
Description
Endpoint3 Descriptor bDescriptorType bEndpointAddress bmAttributes wMaxPacketSize (L) wMaxPacketSize (H) bInterval bLength bLength bLength bLength bLength bDescriptorType bString bString bLength bDescriptorType bString bString bString bString bString bString bString bString bString bString bString bString bString bString a b i h s o String Descriptor (Toshiba) T String Descriptor Language ID 0x0409 1 ms Length of String Descriptor0 Length of String Descriptor1 Length of String Descriptor2 Length of String Descriptor3 Endpoint Descriptor IN Interrupt 8 bytes
String Descriptor Length Setup Area
String Descriptor0
String Descriptor1
String Descriptor2 String Descriptor3
92CF26A-415
2007-11-21
TMP92CF26A 3.16.5 Device Request
UDC support automatically answer in standard request. (1) GET_STATUS Request This request automatically returns to status that is determined by receive side.
bmRequestType
10000000B 10000001B 10000010B
3.16.5.1 Standard request
bRequest
GET_STATUS
wValue
0
wIndex
0 Interface endpoint
wLength
2
Data
Device, interface or endpoint status
Request to device returns according to priority of little endian as follws. D7
0
D6
0
D5
0
D4
0
D3
0
D2
0
D1
Remote wakeup
D0
Self power
D15
0
D14
0
D13
0
D12
0
D11
0
D10
0
D9
0
D8
0
* Remote wakeup Reinstates current remote wakeup setting. This bit is set or reset by SET_FEATURE or CLEAR_FEATURE request. Default is value that is set to bmAttributes field in Config descriptor. * Self power Reinstates current power supply setting. This bit return Self or Bus Power according to value that is set to bmAttributes field in Config descriptor.
Request to interface returns 00H of 2 bytes. Request to endpoint returns according to priority of little endian as follows. D7
0
D6
0
D5
0
D4
0
D3
0
D2
0
D1
0
D0
HALT
D15
0
D14
0
D13
0
D12
0
D11
0
D10
0
D9
0
D8
0
* HALT
Returns to halt status of selected endpoint.
92CF26A-416
2007-11-21
TMP92CF26A
(2) CLEAR_FEATURE request This request clears or disables the relevant function.
bmRequestType
00000000B 00000001B 00000010B
bRequest
CLEAR_ FEATURE
wValue
Feature selector
wIndex
0 Interface endpoint
wLength
0
Data
None
* Reception side device
Feature selector: 1 Feature selector: except 1 Present remote wakeup setting is disabled. STALL state
* Reception side interface
STALL state
* Reception side end point
Feature selector: 0 Feature selector: except 0 Halt of relevant endpoint is cleared. STALL state
Note: Stalls if request is to non-existent endpoint.
(3) SET_FEATURE request This request sets or enables the relevant function.
bmRequestType
00000000B 00000001B 00000010B
bRequest
SET_ FEATURE
wValue
Feature selector
wIndex
0 Interface endpoint
wLength
0
Data
None
* Reception side device
Feature selector: 1 Feature selector: except 1 Present remote wakeup setting is disabled. STALL state
* Reception side interface
STALL state
* Reception side end point
Feature selector: 0 Feature selector: except 0 Halt of relevant endpoint STALL state
Note: Stalls if request is to non-existent endpoint.
92CF26A-417
2007-11-21
TMP92CF26A
(4) SET_ADDRESS request This request sets the device address. Answer subsequent requests using this device address. Answer requests using the current device address until the status stage of this request is terminated normally.
bmRequestType
00000000B
bRequest
SET_ADDRESS
wValue
Device Address
wIndex
0
wLength
0
Data
None
(5) GET_DESCRIPTOR request This request returns appointed descriptor.
bmRequestType
10000000B
bRequest
GET_ DESCRIPTOR
wValue
Descriptor type and Descriptor index
wIndex
0 or Language ID
wLength
Descriptor length
Data
Descriptor
* Device * Config
Device transmits device descriptor that is stored in descriptor RAM. Config transmits config descriptor that is stored in descriptor RAM. At this point, it transmits not only config descriptor but also interface and endpoint descriptor.
* String
String transmits string descriptor of index that is specified by lower byte of wValue field.
Note: Decriptor of short data length in wLength and descriptor length is automatically transmitted by answer of Get_Descriptor.
92CF26A-418
2007-11-21
TMP92CF26A
(6) SET_DESCRIPTOR request This request sets or enables the relevant function.
bmRequestType
00000000B
bRequest
SET_ Descriptor
wValue
Descriptor type and Descriptor index
wIndex
0 or Language ID
wLength
Descriptor length
Data
Descriptor
Automatic answer of this request is not supported. According to INT_SETUP interrupt, if the receiving requested has been identified as a SET_DESCRIPTOR request, take back data after confirming EP0_DSET_A bit of DATASET register is "1". When completed, access EOP register, and write "0" to EP0_EOPB bit, so, status stage is finished. The process is the same for a vendor request. Please refer to vendor request section. (7) GET_CONFIGURATION request This request returns configuration value of present device.
bmRequestType
10000000B
bRequest
GET_ CONFIG
wValue
0
wIndex
0
wLength
1
Data
Configuration value
If it is not configured, it returns "0". Otherwise, it returns the configuration value. (8) SET_CONFIGURATION request This request sets device configuration.
bmRequestType
00000000B
bRequest
SET_ CONFIG
wValue
Configuration value
wIndex
0
wLength
0
Data
None
The configuration value is that specified using lower byte of wValue field. When this value is "0", it is not configured.
92CF26A-419
2007-11-21
TMP92CF26A
(9) GET_INTERFACE request This request returns AlternateSetting value that is set by specified interface.
bmRequestType
10000001B
bRequest
GET_ INTERFACE
wValue
0
wIndex
Interface
wLength
1
Data
Alternate setting
If there is no specified interface, it enters to STALL state. (10) SET_INTERFACE request This request selects AlternateSetting in specified interface.
bmRequestType
00000001B
bRequest
SET_ INTERFACE
wValue
Alternate setting
wIndex
Interface
wLength
0
Data
None
If there is no specified interface, it enters STALL state. (11) SYNCH_FRAME request This request transmits synchronous frame of endpoint.
bmRequestType
10000010B
bRequest
SYNCH_FRAME
wValue
0
wIndex
Endpoint
wLength
2
Data
Frame No.
Automatic answer of this request is not supported. According to INT_SETUP interrupt, if request received has been identified as a SYNCH_FRAME request, write 2byte data in Frame No after confirming EP0_DSET_A bit of DATASET register is "0". When completed, access EOP register, and write "0" to EP0_EOPB bit, so, status stage is completed. This can be used only where the endpoint supports isochronous transfer type and supports this request. The process is the same for a vendor request. Please refer to vendor request section.
92CF26A-420
2007-11-21
TMP92CF26A
3.16.5.2 Printer Class Request UDC does not support "Automatic answer" of printer class request. Processing of Class requests is the same as for vendor requests when answering INT_SETUP interrupt. 3.16.5.3 Vendor request (Class request) UDC does not support "Automatic answer" of Vendor requests. According to INT_SETUP interrupt, access the register in which the device request is stored, and identify the request. If this request is a Vendor request, control the UDC externally, and process the Vendor request. Below is an explanation for the case where data phase is transmitting (Control read), and for the case where data phase is receiving (Control write). (a) Control Read request
bmRequestType
110000xxB
bRequest
Vendor specific
wValue
Vendor specific
wIndex
Vendor specific
wLength
Vendor specific (Expire 0)
Data
Vendor data
When INT_SETUP is received, identify contents of request by bmRequestType, bRequest, wValue, wIndex and wLength registers and process each request. According to application, access Setup_Received register after request has been identified.UDC must also be informed that INT_SETUP interrupt has been recognized. After transmitting data prepared in application, access DATASET register, and confirm EP0_DSET_A bit is "0". After confirming, write data FIFO of endpoint 0. If transmitting data is more than payload, write data after it confirming whether EP0_DSET_A bit in DATASET register is "0". (INT_ENDPOINT0 interrupt can be used.) If writing all data is finished, write "0" to EP0 bit of EOP register. When UDC receives this, the status stage finish automatically. INT_STATUS interrupt is asserted when UDC finishes status stage normally. If finishing status stage normally is recognized by external application, manage this stage by using this interrupt signal. If status stage cannot be finished normally and during status stage, a new SETUP token maybe received. In this case, when INT_SETUP interrupt signal is asserted, "1" is set to STAGE_ERROR bit of EP0_STATUS register Informing externally that the status stage cannot be finished normally. The dataphase may have finished on a data number that is shorter than the value showed to wLength by protocol of control read transfer type in USB. If the application program is configured using only the wLength value, processing cannot be carried out when the host shifts status stage without arriving at the expected data number. At this point, shifting to status stage can be confirmed by using INT_STATUSNAK interrupt signal. (However, releasing mask of STATUS_NAK bit by using interrupt control register is needed.) In Vendor Request, this problem will not occur because the receiving buffer size is set to host controller by driver (In every host, data (data that is transmitted from device by payload of 8 bytes) may be taken to be short packet until confirmation of payload size on device side. Therefore, exercise care if controlling standard requests by software.)
92CF26A-421
2007-11-21
TMP92CF26A
(b) Control write/request There is no dataphase
bmRequestType
010000xxB
bRequest
Vendor specific
wValue
Vendor specific
wIndex
Vendor specific
wLength
0
Data
None
When INT_SETUP is received, identify contents of request by bmRequestType, bRequest, wValue, wIndex, wLength registers and process each request. According to application, access Setup_Received register after request has been identified. UDC must also be informed that the INT_SETUP interrupt has been recognized. If application processing is finished, write "0" to EP0 bit of EOP register. When UDC receives this, the status stage finish automatically. There is dataphase
bmRequestType
010000xxB
bRequest
Vendor specific
wValue
Vendor specific
wIndex
Vendor specific
wLength
Vendor specific (Except for 0)
Data
Vendor data
When INT_SETUP is received, identify contents of device request by bmRequestType, bRequest, wValue, wIndex, wLength registers and process each request. According to application, access Setup_Received register after request has been identified. UDC must also be informed that the INT_SETUP interrupt has been recognized. After receiving data prepared in application, access DATASET register, and confirm EP0_DSET is "1". After confirming, read data FIFO of endpoint 0. If receiving data is more than payload, write data after it confirming whether the EP0_DSET_A bit in DATASET register is "1". (INT_ENDPOINT0 interrupt can be used.) If reading all data is finished, write "0" to EP0 bit of EOP register. When UDC receives this, the status stage finishes automatically. INT_STATUS interrupt is asserted when UDC finishes status stage normally. If finishing status stage normally is recognized by external application, manage this stage by using this interrupt signal. If status stage cannot be finished normally and during status stage, a new SETUP token may be received. In this case, when INT_SETUP interrupt signal is asserted, "1" is set to STAGE_ERROR bit of EP0_STATUS register informing externally that the status stage cannot be finished normally.
92CF26A-422
2007-11-21
TMP92CF26A
Below is control flow in UDC as seen from application.
Start up
Setting each EP mode in Set_Config (Interface)
IDLE
Standard request Printerclass request
Enumeration Identify request RD Access to SetupReceived register Control RD transfer Get_Vendor_Request process EP0 bit = 0 Control WR transfer Set_Vendor_Request process EP0 bit = 1
EP0 bit = 1
EP0 bit = 0 Check DATASET register
Check DATASET register
Transmit Total_Length calculation
Receive Total_Length calculation
Total payload WR number of payload to EP0_FIFO register Total = Total - payload
Total < payload WR number of rest data to EP0_FIFO Total = 0
Total > payload RD number of payload from EP0_FIFO register Total = Total - payload
Total payload RD number of rest data from EP0_FIFO Total = 0
Total = 0
Not processed Total = 0
Receive except INT_STATUS Abnormal finish Normal finish Receive INT_STAS Status finish process in UDC
WR "0" only EP0 bit0 of EOP register
Figure 3.16.6 Control Flow in UDC as seen from Application
Note 1: This chart does not cover special cases in this flow such as overlap receive SETUP packet. Please refer to chapter 4.5.2.3. Note 2: This flow shows various requests. However, the process can be divided up using various interrupts.
92CF26A-423
2007-11-21
TMP92CF26A 3.16.6 Transfer mode and Protocol Transaction
The UDC performs the following automatically in hardware; * * * * * * Receive packet Determine address endpoint transfer mode Error process Confirm toggle bit CRC of data receiving packet Generate toggle bit CRC of data transmitting packet, etc Handshake answer
(1) Protocol outline Format of USB packet is shown below. This is processed during transmission and receiving by hardware into the UDC. * SYNC field This field always comes first in each packet, and input data and internal CLK is synchronized in the UDC. * Packet identification field (PID) This field follows SYNC field in every USB packet. The UDC distinguishes the PID type and determines the transfer type by decoding this code. * Address field The UDC uses this field to confirm whether or not this function was specified by the host. The UDC compares the address with that set to the ADDRESS register. If the address accords with it, the UDC continues the process. If the address does not accord, the UDC ignores this token. * Endpoint field If sub-channels of more than two is needed in fields of 4 bits, it decides the function. The UDC can support a maximum of seven endpoints, excluding the control endpoint. Tokens for endpoints that are not permitted are ignored. * Frame number field A field of 11 bits is added by the host at each frame. This field follows the SOF token that is transmitted first in each frame, and the frame number is specified. The UDC reads the content of this field when the SOF token is received, and sets the frame number to the FRAME register. * Data field This field is data of unit bytes in 0 to 1023. When receiving it, the UDC transfers only part of this data to FIFO, and after CRC is confirmed, an interrupt signal is asserted and the UDC informs FIFO that data transfer is completed. When transmitting, following IN token, FIFO data is transferred. Finally, data CRC field is attached. * CRC function 5 bits CRC is attached to the token, and15 bits CRC to the data. The UDC automatically compares the CRC of the received data with the attached CRC. When transmitting, CRC is generated automatically and is transmitted. This function may be compared by various transfer modes.
92CF26A-424
2007-11-21
TMP92CF26A
(2) Transfer mode UDC supports FULL speed transfer mode. * FULL speed device Control transfer type Interrupt transfer type Bulk transfer type Isochronous transfer type The following is an explanation of UDC operation in each transfer mode. The explanation is of data flow up until FIFO. (a) Bulk transfer type Bulk transfer type warrants transferring no error between host and function by using detect error and retry. Basically, 3 phases are used - token, data and handshake. However, with flow control and a STALL condition, data phase is changed to hand shake phase, and it become to 2 phases. The UDC holds status of each endpoint, and flow control is controlled in hardware. Each endpoint condition can be confirmed using EPx_STATUS register.
92CF26A-425
2007-11-21
TMP92CF26A
(a-1) Transmission bulk mode Below is the transaction format for bulk transfer during transmitting. * * * Token: IN Data: DATA0/DATA1, NAK, STALL Handshake: ACK Control flow Below is the control-flow when the UDC receive an IN token. 1. The token packet is received and the address endpoint number error is confirmed, and it checks whether the relevant endpoint transfer mode corresponds with the IN token. If it does not correspond, the state returns to IDLE. * INVALID condition: State returns to IDLE. * STALL condition: Stall handshake is returned and state returns to IDLE. FIFO condition is confirmed, if data number of 1 packet is not prepared, NAK handshake is returned, and state returns to IDLE. If data number of 1 packet is prepared to FIFO, it shifts to 3. 3. Data packet is generated. Data packet generated by using toggle bit register in UDC. Next, data is transferred from FIFO of internal UDC to SIE, and data packet is generated. At this point, the confirms transferred data number is confirmed. And if there is more than the maximum payload size of each endpoint, bit stuff error is generated, transfer is finished and STATUS becomes STALL. 4. CRC bit (counted transfer data of FIFO from first to last) is attached to last. 5. When ACK handshake from host is received, * Clear FIFO. * Clear DATASET register. * Renew toggle bit, and prepare for next. * Set STATUS to READY. UDC finishes normally. FIFO can receive the next data. If a time out occurs without receiving ACK from host, * Set STATUS to TX_ERR. * Return FIFO address pointer. Execute above setting. And wait next retry keeping FIFO data. This flow is shown in Figure 3.16.7.
2. Condition of EPx_STATUS register is confirmed.
92CF26A-426
2007-11-21
TMP92CF26A
IDLE Receive IN token ConfirmToken packet * PID * Address * Endpoint * Transfer mode * Error OK Confirm Handshake answer * Confirm STATUS register (Status) * Confirm DATASET register OK Generate DATA PID * Attach DATA0/DATA1 * Confirm Datasize register OK Transmit data OK Attach CRC OK Time out * Set STATUS to TX_ERR * Put back FIFO addless pointer Bit stuff error Set STATUS at STALL More than MAX payload Transmit NAK Transmit STALL Stall FIFO empty Error
Invalid
Wait for ACK from host Receive ACK
Normal finish transaction * Clear FIFO * Clear DATASET register * Renew toggle bit * Set STATUS to READY
Figure 3.16.7 Control Flow in UDC (Bulk transfer type (transmission)/Interrupt transfer type (transmission))
92CF26A-427
2007-11-21
TMP92CF26A
(a-2) Receiving bulk mode Below is the transaction format for receiving bulk transfer type. * * * Token: OUT Data: DATA0/DATA1 Handshake: ACK, NAK, STALL Control flow Below is the control-flow when the UDC receive an IN token. 1. The token packet is received and the address endpoint number error is confirmed, and it checks whether the relevant endpoint transfer mode corresponds with the OUT token. If it does not correspond, the state returns to IDLE. * INVALID condition: State returns to IDLE. * STALL condition: When dataphase finishes, stall handshake is returned, the state returns to IDLE, and data is canceled. FIFO condition is confirmed, if data number of 1 packet is not prepared, present transferred data is canceled, NAK handshake is returned after dataphase, and the state returns to IDLE. 3. Data packet is received. Data is transferred from SIE of internal UDC to FIFO. At this point, it confirms transferred data number and if there is more than the maximum payload size of each endpoint, STATUS becomes to STALL and the state returns to IDLE. ACK handshake does not return. 4. After last data is transferred, the counted CRC is compared with the transferred CRC. If they do not correspond, STATUS is set to RX_ERR and the state returns to IDLE. At this point ACK is not returned. After retry, when next data is received normally, STATUS changes to DATIN. If the data toggle does not correspond, it is judged not to have taken ACK in the last loading the current loading is regarded as a retry of the last loading and data is canceled. Set STATUS as RX_ERR, return to host and return to IDLE. FIFO address pointer returns and the next data can be received.
2. Condition of status register is confirmed.
5. If CRC is compared with toggle and it finishes normally, ACK handshake is returned. Below is the process in the UDC. * Set transfer data number to DATASIZE register. * Set DATASET register. * Renew toggle bit, and prepare for next. * Set STATUS to READY. UDC finishes normally. This flow is shown in Figure 3.16.8.
92CF26A-428
2007-11-21
TMP92CF26A
IDLE Receive OUT token Confirm Token packet * PID * Address * Endpoint * Transfer mode * Error OK Confirm Status * Confirm STATUS register (status) * Confirm FIFO's condition OK Generate DATA PID * DATA0/DATA1 * Time out * Toggle check OK Toggle error * Set STATU Sat RX_ERR * Put back FIFO address pointer * Retry recognition clean data Receive data * Error * Confirm receiving data number OK Cancel data Cancel data Error transaction * Set status to stall Except data PID Time out Stall FIFO empty Error transaction * Set STATUS at RX_ERR * Put back FIFO address pointer Error
Invalid
Data communication of more than payload
Transmit ACK
Transmit NAK
Transmit STALL
OK
Retry transaction
Normal finish transaction * Set transfer data number to DATASIZE register * Set DATASET register * Renew toggle bit * Set STATUS to DATAIN
Figure 3.16.8 Control Flow in UDC (Bulk transfer type (Receiving))
92CF26A-429
2007-11-21
TMP92CF26A
(b) Interrupt transfer type Interrupt transfer type uses the same transaction format as transmission bulk transfer. For transmission using toggle bit, hardware setting and answer in the UDC are the same as for transmission bulk transfer. Interrupt transfer can be transferred without using toggle bit. In this case, if ACK handshake from host is not received, toggle bit is renewed, and finish is normal. The UDC clears FIFO for next transfer. (b-1) Interrupt transmitting mode (Toggle mode) UDC operation is same as in bulk transmission mode. Please refer to section (a). (b-2) Interrupt transmission mode (Not toggle mode) This is basically the same as bulk transmission mode. However, if ACK handshake from host is not received, transaction is different. When ACK handshake from host is received after transmission of data packet * * * * Clear FIFO. Clear DATASET register. Renew toggle bit and prepare for next. Set STATUS to READY. UDC finishes normally by above transaction. FIFO can receive next data. If a time out occurs without receiving ACK from host, * * * * Clear FIFO. Clear DATASET register. Renew toggle bit and prepare for next. Set STATUS to TX_ERR. Execute above setting. This setting is the same except for STATUS changes.
92CF26A-430
2007-11-21
TMP92CF26A
(c) Control transfer type Control transfer type is configured in the three stages below. * * * Setup stage Data stage Status stage
Data stage is sometimes skipped. Each stage is configured in one or several transactions. The UDC executes each transaction while managing three stages in hardware. Control transfer has the 3 types given below depending on whether there is data stage or not, and on direction. * * * Control read transfer type Control write transfer type Control write transfer type (No data stage) The 3 transfer sequences are shown in Figure 3.16.10, Figure 3.16.11 and Figure 3.16.12. The UDC automatically answers standard requests in hardware. Class request and vendor request must have an intervening CPU controlling the UDC. Below is the control flow in the UDC and the control flow in the intervening CPU. (c-1) Setup stage Setup stage is the same as transmission bulk transaction except that token ID becomes SETUP. However, control flow in the UDC is different. * * * Token: SETUP Data: DATA 0 Handshake: ACK Control flow Below is the control flow in the UDC when SETUP token is received. 1. SETUP token packet is received and address, endpoint number and error are confirmed. It also checks whether the relevant endpoint is in control transfer mode. 2. STATUS register state is confirmed. State return to IDLE only if it is INVALID state. In bulk transfer mode, receiving data is enabled by STATUS registers value and FIFO condition. However, in SETUP stage, STATUS is returned to READY and accessing from the CPU to FIFO is always prohibited and internal FIFO of endpoint 0 is cleared. It also prepares for following dataphase. If the CPU accesses Setup Received registers in the UDC, it recognizes as Device request as received, and accessing from the CPU to EP0 is enabled. This function is for receiving a new request when the current device request has not finished normally.
92CF26A-431
2007-11-21
TMP92CF26A
3. Data packet is received. Device request of 8 bytes from SIE in UDC is transferred to the request register below. * bmRequestType register * bmRequest register * wValue register * wIndex register * wLength register 4. After last data is transferred, counted CRC is compared with transferred CRC. If they do not correspond, STATUS is set to RX_ERR and the state returns to IDLE. At this point it does not return ACK, and host retries. 5. If CRC corresponds with toggle and it finishes normally, ACK handshake is returned to host. The process in the UDC is shown below. * Receiving device request is judged whether software control or hardware control. If the request needs control in software, INT_SETUP interrupt is asserted. If hardware is used, INT_SETUP interrupt is not asserted. * According to stage control flow, prepare for next stage. * Set STATUS to DATAIN. * Set toggle bit to "1". The Setup stage is completed by the above. This flow is shown in Figure 3.16.6. 8-byte data that is transferred by this SETUP stage is device request. The CPU must process corresponding to device request. The UDC detects the following contents only from data of 8 bytes, and it manages stage in hardware. * Whether there is data stage or not * Data stage direction These are used to determine control read transfer type, control write transfer type, and control write transfer type (no data phase).
92CF26A-432
2007-11-21
TMP92CF26A
IDLE Receive SETUP token Confirm Token packet * PID * Address * Endpoint * Transfer mode * Error OK Confirm Status * Confirmation STATUS register (Status) OK Confirm DATA PID * DATA0 * Time out OK Error, more than payload data comunication Receive data * Error * Confirm receving data number OK Except DATA0 PID Time out Error
Invalid
Error transaction * Set STATUS to RX_ERR * Put back FIFO address point
Transmit ACK OK
Normal finish transaction * Set DATASET register * Assert INT_SETUP and request flag * According to stage flow, prepare for next stage * Set STATUS to DATAIN * Set toggle bit to 1
Figure 3.16.9 Control Flow in UDC (Setup stage)
92CF26A-433
2007-11-21
TMP92CF26A
(c-2) Data stage Data stage is configured by one or several transactions based on toggle sequence. The transaction is the same as for format transmission or receiving bulk transaction except for the following differences; * * Toggle bit starts from "1" by SETUP stage. It determines whether right or not by comparing IN and OUT token with direction bit of device request. If a token of the opposite direction is received, it is recognized as status stage. INT_ENDPOINT0 interrupt is asserted.
*
(c-3) Status stage Status stage is configured 0-data-length packet with DATA1's PID and handshake IN or OUT token. It uses a transaction in the opposite direction to the preceding stage. The combination is given below. * * * Control read transfer type: OUT Control write transfer type: IN Control write transfer type (not dataphase): IN
UDC processes status stage base of control flow in control transfer type. At this point, CPU must write "0" to EP0 bit of EOP register in last transaction for status stage to finish normally. Details of status stage are given below. (c-3-1) IN status stage IN status stage transaction format is given below. * Token: IN * Data: DATA1 (0 data length), NAK, STALL * Handshake: ACK
Control flow The transaction flow of IN status stage in UDC is given below. 1. Token packet is received and address, endpoint number and error are confirmed. If it does not correspond, the state returns to IDLE. If status stage is enabled based on stage control flow in the UDC, advance to next stage. STATUS register state is confirmed. * INVALID condition: State returns to IDLE. * STALL condition: Stall handshake is returned and state returns to IDLE. Confirmation of whether EOP register is accessed or not is carried out externally. If it is not accessing, NAK handshake is returned to continue control transfer and state returns to IDLE. 3. If EOP register is access is confirmed, 0-data-length data packet and CRC are transmitted.
2.
92CF26A-434
2007-11-21
TMP92CF26A
4. If ACK handshake from host is received, * Set STATU to READY. * Assert INT_STATUS interrupt. It finishes normally by the above transaction. If a time out occurs without receiving ACK from host, * Set STATUS register to TX_ERR and state returns to IDLE and wait for restring status stage. At this point, if new SETUP stage is started without status stage finishing normally, the UDC sets error to STATUS register. (c-3-2) OUT status stage The transaction format for OUT status stage is given below. * Token: OUT * Data: DATA1 (0 data length) * Handshake: ACK, NAK, STALL Control flow The transaction flow for OUT status stage in the UDC is given below. 1. Token packet is received and address, endpoint number and error are confirmed. If they do not correspond, the state returns to IDLE. If status stage is enabled base on stage control flow in the UDC, advance to next stage. STATUS register state is confirmed. * INVALID condition: State returns to IDLE. * STALL condition: Data is cleared, stall handshake is returned, and state returns to IDLE. Whether EOP register is accessed or not is confirmed externally. If it is not accessed, NAK handshake is returned to continue control transfer and state returns to IDLE. 3. 4. If EOP register is access is confirmed, 0-data-length data packet and CRC are received. If there is no error in data, ACK handshake is transmitted to host. * Set STATUS to READY. * Assert INT_STATUS interrupt. It finishes normally by the above transaction. If there is an error in data, ACK handshake is not returned. * Set RX_ERR to STATUS register and return to IDLE. It waits to retry status stage. At this point, if new SETUP stage is started without status stage finishing normally, the UDC sets error to STATUS register. For sequence of this protocol, refer to section supplement.
2.
92CF26A-435
2007-11-21
TMP92CF26A
(c-4) Stage management The UDC manages each stage of control transfer by hardware. Each stage is changed by receiving token from USB host, or CPU accesses register. Each stage in control transfer type has to process combination software. UDC detects the following contents from 8-byte data in SETUP stage. The stage is managed by determining control transfer type. * * Whether there is data stage or not Data stage direction
Based on these it is determines to be either control read transfer type control write transfer type, or control write transfer type (No data stage). Various conditions for changing stage in control transfer are given below. If receiving token for next stage from host before switching to next stage from state of internal UDC, NAK handshake is returned and BUSY is informed to USB host. In all control transfer types, if SETUP token is received from host current transaction is stopped, and it switches to SETUP stage in the UDC. The CPU receives new INT_SETUP even if it is processing previous control transfer.
92CF26A-436
2007-11-21
TMP92CF26A
Stage change condition of control read transfer type 1. Receive SETUP token from host * Start setup stage in UDC. * Receive data in request normally and judge. And assert INT_SETUP interrupt externally. * Change data stage in the UDC. 2. Receive IN token from host * The CPU receives a request from the request register every INT_SETUP interrupt. * Judge request and access Setup Received register to inform the UDC that INT_SETUP interrupt has been recognized. * According to Device request, monitor EP0 bit of DATASET register, and write data to FIFO. * If the UDC is set data of payload to FIFO or CPU set short packet transfer in EOP register, EP0 bit of DATASET register is set. * The UDC transfers data that is set to FIFO to host by IN token interrupts. * When the CPU finishes transaction, it writes "0" to EP0 bit of EOP register. * Change status stage in the UDC. 3. Receive OUT token from host. * Return ACK to OUT token, and change state to IDLE in the UDC. * Assert INT_STATUS interrupt externally. These changing conditions are shown in Figure 3.16.10.
SETUP DATA0 ACK INT_SETUP INT_ ENDPOINT0 INT_STATUS REQUEST FLAG DATASET register BRD BWR IN NAK IN DATA1 ACK IN DATA0 ACK OUT DATA1 ACK
bmRequestType register bRequest register wValue register wIndex register wLength register
Setup Received register
EP0_FIFO (Rest data) EP0_FIFO (WR of payload)
EOP register
Figure 3.16.10 The Control Flow in UDC (Control Read Transfer Type)
92CF26A-437
2007-11-21
TMP92CF26A
Stage change condition of control write transfer type 1. Receive SETUP token from host. * Start setup stage in the UDC. * Receive data in request normally and judge. And assert INT_SETUP interrupt externally. * Change data stage in the UDC. 2. Receive OUT token from host. * CPU receives a request from the request register every INT_SETUP interrupt. * Judge request and access Setup Received register for inform the UDC that INT_SETUP interrupt has been recognized. * Receive dataphase data normally, and set EP0 bit of DATASET register. * The CPU receives data in FIFO by setting DATASET. * The CPU processes receiving data by device request. * When the CPU finishes transaction, it writes "0" to EP0 bit of EOP register. * Change status stage in the UDC. 3. Receive IN token from host. * Return data packet of 0 data to IN token, and change state to IDLE in the UDC. * Assert INT_STATUS interrupt externally when ACK for 0 data packet is received. These changing conditions are shown in Figure 3.16.11.
SETUP DATA0 ACK INT_SETUP INT_ ENDPOINT0 INT_STATUS REQUEST FLAG DATASET register BRD BWR OUT DATA1 ACK OUT DATA0 NAK OUT DATA0 ACK IN NAK IN DATA1 ACK
bmRequestType register bRequest register wValue register wIndex register wLength register
Setup Received register
EP0_FIFO (Rest data) EP0_FIFO (RD of payload)
EOP register
Figure 3.16.11 The Control Flow in UDC (Control Write Transfer Type) In control read transfer type, transaction number of data stage does not always correspond with the data number specified by the device request. The CPU can therefore process using INT_STATUSNAK interrupt. However, when class and vendor request is used, wLength value corresponds to data transfer number in data phase. With this setting, using this interrupt is not need. Data stage data can be confirmed by accessing DATASIZE register.
92CF26A-438
2007-11-21
TMP92CF26A
Stage change condition of control write (no data stage) transfer type 1. Receive SETUP token from host * Start setup stage in the UDC. * Receive data in request normally and judge. And assert INT_SETUP interrupt externally. * Change data stage in the UDC. 2. Receive IN token from host * CPU receives a request from the request register every INT_SETUP interrupt. * Judge request and access Setup Received register to inform the UDC that INT_SETUP interrupt has been recognized. * The CPU processes receiving data by device request. * When the CPU finishes transaction, it writes "0" to EP0 bit of EOP register. * Change status stage in the UDC. * Return data packet of 0 data to IN token, and change state to IDLE in the UDC. * Assert INT_STATUS interrupt externally when ACK for 0 data packet is received. These change condition is Figure 3.16.12.
SETUP DATA0 ACK INT_SETUP INT_ ENDPOINT0 INT_STATUS REQUEST FLAG DATASET register BRD BWR IN NAK IN DATA1 ACK
bmRequestType register bRequest register wValue register wINdex register wLength register
Setup Received register
EOP register
Figure 3.16.12 The Control Flow in UDC (Control Write Transfer Type not Dataphase)
92CF26A-439
2007-11-21
TMP92CF26A
(d) Isochronous transfer type Isochronous transfer type is guaranteed transfer by data number that is limited to each frame. However, this transfer does not retry when an error occurs. Therefore, Isochronous transfer type transfer only 2 phases (token, data) and it does not use handshake phase. And data PID for data phase is always DATA0 because of this transaction does not support toggle sequence. Therefore, UDC does not confirm when data PID is in receiving mode. Isochronous transfer type processes data every frame. Therefore, all transaction for completed transfer use receiving SOF token. The UDC uses FIFO that is divided into two in Isochronous transfer type. (d-1) Isochronous transmission mode The transaction format for Isochronous transfer type format in transmitting is given below. * * Token Data Control flow Isochronous transfer type is frame management. And data that is written to FIFO in endpoint is transmitted by IN token in the next frame. Below are two conditions in FIFO of Isochronous transmission mode transferring. X. FIFO for storing data that transmits to host in present frame (DATASET register bit = 1) Y. FIFO for storing data for transmitting host in next frame (DATASET register bit = 0) FIFO that is divided into two (packet A and packet B) conditions is whether X condition or Y condition. The flow below is explained as X Condition (packet A), Y Condition (packet B) in present frame. X and Y conditions change one after the other by receiving SOF. Control flow in the UDC when receiving IN token is shown below. 1. Token packet is received and address endpoint number error is confirmed, and it checks whether the relevant endpoint transfer mode corresponds with the IN token. If it does not correspond, the state returns to IDLE. 2. Condition of status register is confirmed. INVALID condition: State returns to IDLE. 3. Data packet is generated. Data packet is generated. At this point, data PID is always attached to DATA0. Next, data is transferred from FIFO (X condition) of packet A in UDC to SIE and DATA packet is generated. 4. CRC bit (counted transfer data of FIFO from first to last) is attached to last. : IN : DATA0
92CF26A-440
2007-11-21
TMP92CF26A
5. Below is transaction when SOF token is received from host. * Change the packet A's FIFO from X Condition to Y Condition and clear data. * Change the packet B from Y Condition to X Condition. * Set frame number to frame register. * Assert SOF and inform externally that frame is incremented. * DATASET register clears packet A bit and it sets packet B bit arrangement loading in present frame. * Set STATUS to READY. The UDC finishes normally by above transaction. Packet A's FIFO can be received with next data. In renewed frame, Packet A's FIFO interchanges with packet B's FIFO, and transaction uses same flow. If SOF token is not received by error and so on, this data is lost because frame is not renewed. There is no problem in receiving PID if frame data is received with CRC error, USB sets LOST to STATUS on FRAME register, and frame number is not renewed. However, in this case, SOF is asserted and FIFO condition is renewed. If SOF token is received without transmit and transfer Isochronous in frame, UDC clears FIFO (X Condition) and sets STATUS to FULL.
92CF26A-441
2007-11-21
TMP92CF26A
IDLE Receive IN token Confirm Token packet * PID * Address * Endpoint * Transfer mode * Error OK Confirm Status * Confirm STATUS register (status) OK Generate DATA PID * Attach DATA0 * Confirm DATASIZE register OK Transmit data Error transaction Set LOST to FRAME register Not renew FRAME number Assert SOF Attach CRC Receive SOF without transmitting data Clear X condition (A) Set FULL to STATUS Invalid
Error
IDLE ReceiveSOF * FRAME noread * BANK shift Shift FIFO BANKs every receive SOF
BANK B transaction * Assert SOF * Clear transmitting FIFO BANK A in preceding frame * Clear DATASET register's BANK A bit * Set DATASET register's BANK B bit (Finish a write in previous frame) * Set STATUS to READY * Wait data for transmitting next frame (BANK A)
Not receive SOF Not renewal frame number loss data
BANK A transaction * Assert SOF * Clear transmitting FIFO BANK B in preceding frame * Clear DATASET register's BANK B bit * Set DATASET register's BANK A bit (Finish a write in previous frame) * Set STATUS to READY
Figure 3.16.13 Control Flow in UDC (Isochronous transfer type (Transmission))
92CF26A-442
2007-11-21
TMP92CF26A
(d-2) Isochronous receiving mode Transaction format for Isochronous transfer type in receiving is given below. * * Token Data Control flow Isochronous transfer type is frame management. And data that is written to FIFO by OUT token is received to the CPU in the next frame. Below are two conditions in FIFO of Isochronous receiving mode transferring X. FIFO for storing data received from host in present frame (DATASET register bit = 0) Y. FIFO for storing data for transmitting host in previous frame (DATASET register bit = 1) FIFO that is divided into two (packet A and packet B) conditions is whether X condition or Y condition. The flow below explains X Condition (packet A) and Y Condition (packet B) in present frame. X and Y conditions change one after the other by receiving SOF. Below is control flow in the UDC when receiving OUT token. The whole transaction is processed by hardware. 1. Token packet is received and address endpoint number error is confirmed, and it checks whether the relevant endpoint transfer mode corresponds with the OUT token. If it does not correspond, the state returns to IDLE. 2. Condition of status register is confirmed. * INVALID condition: State return to IDLE. 3. Data packet is received. Data is transferred from SIE into the UDC to packet A's FIFO (X Condition). 4. After last data has been transferred, and counted CRC is compared with transferred CRC. When transfer is finished, the result is reflected to STATUS. However, data is stored FIFO, data number that packet A is received is set to DATASIZE register of packet A. 5. The transaction when SOF token from host is received is given below. * Change packet A's FIFO from X Condition to Y Condition. * Change packet B from Y Condition to X Condition, and clear data. Prepare for next transfer. * Set frame number to frame register. * Assert SOF and inform externally that frame is incremented. * DATASET register set packet A bit and clear packet B bit arrangement loading in present frame. * If CRC comparison result agrees it, DATAIN is set to STATUS. If result does not agree, RX_ERR is set to STATUS. The UDC finishes normally by the above transaction. The CPU takes back packet A's data. :OUT : DATA0
92CF26A-443
2007-11-21
TMP92CF26A
In renewed frame, Packet A's FIFO interchanges with packet B's FIFO, and the transaction uses the same flow. If SOF token is not received by error and so on, this data is lost because the frame is not renewed. There is no problem in receiving PID and if frame data is received with CRC error, USB sets LOST to STATUS on FRAME register, and frame number is not renewed. However, in this case, SOF is asserted and FIFO condition is renewed. If SOF token is received without transmit and transfer Isochronous in frame, UDC clears FIFO (X Condition) and sets STATUS to FULL. These are shown in Figure 3.16.14.
92CF26A-444
2007-11-21
TMP92CF26A
IDLE Receive OUT token Confirm Token packet * PID * Address * Endpoint * Transfer mode * Error OK Confirm Status Confirming STATUS register (status) OK Confirm DATA PID * Time out * Error OK Error, time out exept data PID Invalid
Error
Receive SOF nothing transmitting data
Clear X Condition (A)
Error, receiving data more than payload. Receiving data * Error * Receive receiving data Error transaction Set STATUS to RX ERR BANK B transaction * Assert SOF * Receive SOF * Frame no read * Shift BANK Shift FIFO BANK every receive SOF * * * Set data size received preceding frame to DATASIZE register in BANK A Set BANK A bit in DATASET register Clear BANK B bit in DATASET register Set STATUS to DATAIN (But if error generate, set RX_ERR)
IDLE
Not receive SOF Not renew frame number loss data
BANK A transaction * Assert SOF * * * Set data size received preceding frame to DATASIZE register in BANK B Set BANK B bit in DATASET register Clear BANK A bit in DATASET register Set STATUS to DATAIN (But if error generate, set RX_ERR)
*
Figure 3.16.14 Control Flow in UDC (Isochronous transfer type (Receiving))
92CF26A-445
2007-11-21
TMP92CF26A 3.16.7 Bus Interface and Access to FIFO
(1) CPU bus interface The UDC prepares two types of FIFO access, single packet and dual packet. In single packet mode, FIFO capacity that is implemented by hardware is used as large FIFO. In dual packet mode, FIFO capacity is divided into two and used as two FIFOs. It is also used as an independent FIFO. Even if the UDC is transmitting and receiving to USB host, it can be used as an efficient bus by possible load to FIFO. But control transfer type receives only single packet mode. Epx_SINGLE signal in dual packet mode must be fixed to "0". If this signal is fixed to "0", FIFO register runs in single mode. Sample: Where endpoint 1 is used to dual packet of payload 64 bytes.
EP1_FIFO size EP1_SINGLE signal EP1 Descriptor setting Direction Max payload size Transfer mode : : : Optional 64 bytes Optional : : Prepare 128 bytes Hold 0
92CF26A-446
2007-11-21
TMP92CF26A
(a) Single packet mode This is data sequence of single packet mode when CPU bus interface is used. Figure 3.16.15 is receiving sequence. Figure 3.16.16 is transmitting sequence. This chapter focuses on access to FIFO. For Data sequence with USB host refer to chapter 5. Endpoint 0 cannot be changed to exclusive single packet mode. Endpoints 1 to 3 can be changed between single packet and dual packet by setting Epx_SINGLE register. Do not change packet when transferring.
Wait receiving data IDLE Receive valid data
DATASET = 0
DATASET register * Set bit of EPx_D SET_A * Assert EPx_DATASET signal Interrupt by EPx_FULLA Check DATASET register DATASET register * Check bit of EPx_DSET_A
DATASET = 1 SIZE register * Size of SIZE_A_L confirmation
* Size of SIZE_A_H confirmation
RD receiving data of size in relevant endpoint
* Clear receiving data in FIFO * Clear relevant bit of DATASET register
Figure 3.16.15 Receiving Sequence in Single Packet Mode
92CF26A-447
2007-11-21
TMP92CF26A
Below is the transmitting sequence in single packet mode.
Wait transmission event IDLE Transmission event DATASET = 0 DATASET register * Check bit of EPx_DSET_A DATASET = 1 Distinction transmitting
Wait transmitting rest data Transmitting number > payload
Transmitting number < payload * WR of transmitting number relevant endpoint * Total = 0
* WR of payload to relevant endpoint * Total = Total - payload
If transmitting number reach to payload, relevant bit of DATASET register is set 1
EOP register WR 0 to only bit of relevant endpoint
If transmitting finish normally, it clears relevant bit of DATASET.
Wait transmitting Wait IN token * Must access to EOP register in transmitting short packet. * This is used showing to the closing control transfer type. If you access to endpoint 0, you must to access in closing control transfer type.
Finish transmitting
Figure 3.16.16 Transmitting Sequence in Single Packet Mode
92CF26A-448
2007-11-21
TMP92CF26A
(b) Dual packet mode In dual packet mode, FIFO is divided into A and B packet, and is controlled according to priority in hardware. It can be performed at once, transmitting and receiving data to USB host and exchanges to external of UDC. When it reads out data from FIFO for receiving, confirm condition of two packets, and consider the order of priority. If it has received data to two packets, the UDC outputs from first receiving data by FIFO that can be accessed are common in two packets. DATASIZE register is prepared for both packet A and packet B. First, the CPU must recognize the data number of first receiving packet by PACKET_ACTIVE bit. If PACKET_ACTIVE bit has been set to 1, that packet is received first. Packet A and packet B set data turn about always. This is shown below.
Wait receiving data IDLE Receiving valid data
DATASET register * Set bit of EPx_DSET_A (B) * Assert EPx_DATASET signal DATASET = 0 Interrupt by EPx_FULL_A (B) Check DATASET register DATASET register * Check bit of EPx_DSET_A * Check bit of EPx_DSET_B DATASET = 1 SIZE register * Confirm Size of SIZE_A_L * Confirm Size of SIZE_A_H * Confirm Size of SIZE_B_L * Confirm Size of SIZE_B_H
* Read size of receiving data from relevant endpoint * There are below 3 cases by setting bit of DATASET Only A: Read number of sizeA register Only B: Read number of sizeB register Both of A and B: Read number of sizeA + B register
* Clear receiving data in FIFO * Clear applicable bit in DATASET register
Figure 3.16.17 Receiving Sequence in Dual Packet Mode
92CF26A-449
2007-11-21
TMP92CF26A
Below is the Transmitting Sequence in Dual Packet Mode.
Wait transmitting event
IDLE Interrupt by EPx_EMPTY_A (B) Check DATASET register DATASET = 0 Transmitting event DATASETregister * Check bit of EPx_DSET_A * Check bit of EPx_DSET_B
DATASET = 1 Transmittind data distinction
Wait transmitting rest data
Transmitting number > payload x 2 * Write number of payload x 2 in relevant endpoint * Total = Total - payload x 2
Transmitting number < payload x 2 * Write number of transmitting number * Total = 0
If transmitting number reach to payload, DATASET set 1 to relevant bit of register
EOP register Write 0 to only bit of relevant endpoint
If transmitting finish normally, It clears relevant bit of DATASET.
Wait transmitting Wait IN token * Accessing to EOP register is needed in transmitting short packet * Control transfer type is only single mode
Finish transmitting
Figure 3.16.18 Transmitting Sequence in Dual Packet Mode
92CF26A-450
2007-11-21
TMP92CF26A
(c) Issuance of NULL packet If transmitting NULL packet, by input L pulse from EPx_EOPB signal, data of 0 length is set to FIFO, and NULL packet can be transferred to IN token. But if NULL data is set to FIFO, it is valid only in the case whole SET signal is L level condition (where FIFO is empty). If it answer to receiving IN token by using NULL packet in a certain period, it is answered by keeping EPx_EOPB signal to L level. However, if mode is dual packet mode, EPx_DATASET signal assert L level for showing space of data. Therefore, data condition (whether either has data or not) cannot be confirmed externally.
Note: NULL packet can also be set by accessing EOP register.
Example:
NULL packet completion of transmitting
DATASET_A DATASET_B EPx_EOPB NULL Neglect A NULL B NULL A NULL B NULL A
(2) Interrupt control Interrupt signal is prepared. This function use adept system. For detail refer to 3.16.2 900/H1 CPU I/F.
92CF26A-451
2007-11-21
TMP92CF26A 3.16.8 USB Device answer
The USB controller (UDC) sets various register and initialization in the UDC in detecting of hardware reset, detecting of USB bus reset, and enumeration answer. Each condition is explained below. (1) bus reset detect condition. When the UDC detects a bus reset on the USB signal line, it initializes internal register, and it prepares enumeration operation from USB host. After detecting a USB reset, the UDC sets ENDPOINT0 to control transfer type 8-byte payload and default address for using default pipe. Any endpoint other than this is prohibited.
Register name ENDPOINT STATUS EP0 Except for EP0 Initial value 40H 5CH
(2) Detail of STATUS register Status register that has been prepared for each endpoint shows the condition of each endpoint in the UDC. Each condition affects the various USB transfers. Refer to chapter 5 for the changing conditions for each transfer type. EPx_STATUS register value is 0 to 3, and its shows conditions are shown. 0 to 4 are the results of various transfers. It can be confirmed previous result that is transferred to endpoint by confirming from external of UDC.
0 1 2 3 4 READY DATAIN FULL TX_ERR RX_ERR
These conditions mean that the endpoint is operating normally. The meaning that is showed is different for each transfer mode. Therefore, please refer to each transfer mode column below.
92CF26A-452
2007-11-21
TMP92CF26A
ISO transfer mode Below is the transfer condition for the previous frame. Receiving SOF renews this. OUT (RX)
Initial Not transfer Finish normally Detect anerror READY READY DATAIN RXERR
IN (TX)
READY FULL READY TXERR
Transfer modes other than ISO transfer This is the result of the previous transfer. When transfer is finished, this is renewed. OUT, SETUP
Initial Transfer finish normally Status stage finish Transfer error READY DATAIN READY RXERR
IN
READY READY READY TXERR
"Initial" is that renew RESET, USB reset, Current_Config register. In detect error, it does not generate EPx_DATASET except in toggle transfer mode and Isochronous transfer mode of interrupt. 5 to 7 in shows the status register means that the endpoint is in special condition.
5 BUSY BUSY is generated only at endpoint of control transfer. If UDC transfer in control writes transfer, when CPU has not finished enumeration transaction, and if it receives ID of status stage from USB host, BUSY is set. STATUS is BUSY until CPU finishes enumeration transaction and EP0 bit of EOP register is written 0 in UDC. If CPU enumeration transaction finishes and EP0 bit of EOP register is written 0 and status stage from USB host finishes normally, it displays READY. Please refer to 5.2.3 in chapter 5. 6 STALL STALL shows that endpoint is in STALL condition. This condition is generated if it violates protocol or error in bus enumeration. To return endpoint to normal transfer condition, USB device request is needed. This request returns to normal condition. But control endpoint returns to normal condition by receiving SETUP token. And it becomes to SETUP stage.
7
INVALID
This condition shows condition that endpoint cannot be used. UDC sets condition that isn't designated in ENDPOINT to INVALID condition, and it ignores all tokens for this endpoint. In initializing, this condition is always generated. When UDC detects hardware reset, it sets all endpoints to INVALID condition. Next, if USB reset is received, endpoint 0 only is renewed to READY. Other endpoints that are defined on disruptor are renewed if SET_CONFIG request finishes normally.
92CF26A-453
2007-11-21
TMP92CF26A 3.16.9 Power Management
USB controller (UDC) can be switched from optional resume condition (turn on the power supply condition) to suspend (Suspension) condition, and it can be returned from suspend condition to turn on the power supply condition. This function can be set to low electricity consumption by operating CLK supplying for UDC. (1) Switch to suspend condition The USB host can set the USB device to suspend condition by maintaining IDLE state. The UDC switches to suspend condition by the following process. * * UDC switches to suspend condition if it detect IDLE state of more than 3 ms on USB signal. At this point, set SUSPEND bit of STATUS register to "1". After switching to suspend condition, if 2 ms have already passed, UDC renews USBINTFR1 from "0" to "1". After USBINTFR1 has been renewed from "0" to "1", set USBCR1 to "0", and supply of CLK (USB_CLK) is stopped. In this condition, all register values into the UDC are kept. However, external access is not possible except for reading of STATUS register, Current_Config register, and USBINTFR1, USBINTFR2, USBINTMR1, USBINTMR2 and USBCR1
*
(2) Return from suspend condition by host resume There are two ways for the UDC change from suspend condition to resume condition; resume condition output from USB host and remote wakeup. When activity of bus on USB signal is restored by resume condition output from USB, the UDC resets SUSPEND output from "1" to "0", and it resets SUSPEND bit of STATUS register from "0". The system is thereby resumed. The resume condition output from the host is maintained for at least 10 ms. Therefore effective protocol occurring on USB signal line is after this time has elapsed. (3) Return from suspend condition by remote wakeup Remote wakeup is system for prompt resume from suspended USB device to USB host. Some applications do not support remote wakeup. Remote wakeup is also limited using from USB host by bus enumeration. UDC remote wakeup function can be used when it is permitted. Setting remote wakeup by bus can be confirmed by bit7 of Current_Config register. When this bit is "1", remote wakeup can be used. Remote wakeup is not disabled by this bit. Therefore, if this bit shows disabled, remote wakeup must not be set. If it fill the conditions, output resume condition output to USB host by writing USBCR1 from "1" to "0" of UDC in suspend condition. And it prompts resume from UDC to host. After UDC changes to suspend condition, WAKEUP input is ignored for 2 ms. Therefore, remote wakeup becomes effective when USBINTFR1 is set to "1".
92CF26A-454
2007-11-21
TMP92CF26A
(4) Low power consumption by control of CLK input signal When the UDC switches to suspend condition, it stops CLK and switches to low power consumption condition. But as system, this function enables low power consumption by stopping source of CLK that is supplied externally. CLK that is supplied to the UDC can control clock supply to USB by using USBINTFR1 and . If UDC switches to suspend condition, USBINTFR1 is set to "1", and is set to "1". After confirmation, stop CLK supply (USBCLK) by setting "0" to USBCR1. If SUSPEND signal is set to "0" by resuming from host, supply normal CLK to UDC within 3 ms. When remote wakeup is used, it is necessary to supply a stable CLK to the UDC before use. When doubler circuit is used as generation source, the above control is needed.
92CF26A-455
2007-11-21
TMP92CF26A 3.16.10 Supplement
(1) External access flow to USB communication a)
SETUP DATA0 ACK INT_SETUP INT_ ENDPOINT0 INT_STATUS REQUEST FLAG EP0 FIFO access Request access Setup Received access EOP register access
Normal movement
IN NAK IN DATA1 ACK IN DATA0 ACK OUT DATA1 ACK
b)
SETUP DATA0 ACK INT_SETUP INT_ ENDPOINT0 INT_STATUS REQUEST FLAG EP0 FIFO access Request access Setup Received access EOP register access Stage error bit STATUS register read
Stage error
IN NAK IN DATA1 ACK IN DATA0 ACK SETUP DATA0 ACK
Normal
Stage error
Normal
92CF26A-456
2007-11-21
TMP92CF26A
(2) Register Initial value
Register Name bmRequestType bRequest wValue_L wValue_H wIndex_L wIndex_H wLength_L wLength_H Current_Config Standard request Request DATASET Port Status Standard request mode Request mode Initial Value OUTSIDE Reset 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x18 0x00 0x00 Initial Value USB_RESET 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Hold Hold Hold INT control USBBUFF_TEST USB state EPx_MODE EPx_STATUS EPx_SIZE_L_A EPx_SIZE _L_B EPx_SIZE_H_A EPx_SIZE_H_B FRAME_L FRAME_H ADRESS EPx_SINGLE EPx_BCS ID_STATE Register Name Initial Value OUTSIDE Reset 0x00 0x00 0x01 0x00 0x1C 0x88 0x08 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x01 Initial Value USB_RESET 0x00 Hold 0x01 0x00 0x1C 0x88 0x08 0x00 0x00 0x00 0x02 0x00 Hold Hold 0x00
Note 1: The above initial value is the value that is initialized by external reset, USB_RESET. This value may differ from that displayed depending on conditions. Please refer to register configure in chapter 2. Note 2: Initial value of EPx_SIZE_L_A, EPx_SIZE_L_B, EPx_SIZE_H_A, EPx_SIZE_H_B registers differ by size of FIFO. EP0_STATUS register is initialized to 0x00 after USB_RESET is received. Note 3: Initial value of ID_STATE register is initialized by external reset, BRESET. When USB_RESET signal is received from host, it isinitialized to 0x00.
92CF26A-457
2007-11-21
TMP92CF26A
(3) USB control flow chart (a) Transaction for standard request (Outline flowchart (Example))
USB interrupt
Call USBINT0 function
Evaluate Interrupt
SETUP transaction
ENDPOINT 0 transaction
STATUS transaction
STATUS NAK transaction
ENDPOINT 1 transaction
92CF26A-458
2007-11-21
TMP92CF26A
(b) Condition change
Turn on power supply
Initialization transaction
Normal finish/No transaction Waiting USB interrupt condition
Transmit Request error/ S
Receive USB token
Transaction error/ Transmit STALL Request transaction condition
92CF26A-459
2007-11-21
TMP92CF26A
(c) Device request and evaluation of various requests
Start
Get request data
Evaluate Request
Standard request CLEAR_FEATURE SET_FEATURE GET_STATUS SET_ADDRESS SET_CONFIGURATION GET_CONFIGURATION SET_INTERFACE GET_INTERFACE SYNCH_FRAME GET_DESCRIPTOR
Class request * Error for not support
Vendor request * Error for not support
Error transaction
End
92CF26A-460
2007-11-21
TMP92CF26A
(c-1) CLEAR_FEATURE request transaction
Start
No Is request right Yes Evaluate Recipient
Device Disable remote wakeup setting
Endpoint Clear stall setting
Error transaction
Finish transaction
End
92CF26A-461
2007-11-21
TMP92CF26A
(c-2) SET_FEATURE request transaction
Start
No Is request right? Yes Evaluate Recipient
Device Enable remote wakeup setting
Endpoint Set stall
Error transaction
Finish transaction
End
92CF26A-462
2007-11-21
TMP92CF26A
(c-3) GET_STATUS request transaction
Start
No Is request right? Yes Evaluate Recipient
Device Set self power supply information
Interface Set 0 x 0 0 data of 2 bytes
Endpoint Set stall information
Error transaction
Finish transaction
End
92CF26A-463
2007-11-21
TMP92CF26A
(c-4) SET_CONFIGRATION request transaction
Start
No Is request right Yes No Is EP0 stall Yes Is assignment value valid Yes No Is state valid Yes Set assigned configuration value Error transaction No
Clear stall flag
Finish transaction
End
92CF26A-464
2007-11-21
TMP92CF26A
(c-5) GET_CONFIGRATION request transaction
Start
No Is request right? Yes No Is state valid? Yes Set present configuraion value Error transaction
Finish transaction
End
92CF26A-465
2007-11-21
TMP92CF26A
(c-6) SET_INTERFACE request transaction
Start
No Is request right? Yes No Is EP0 stall? Yes Is assigned value valid? Yes No Is state valid? Yes Set each endpoint to assigned configuration value. Error transaction No
Finish transaction
End
92CF26A-466
2007-11-21
TMP92CF26A
(c-7) SYNCH_FRAME request transaction
Start
No Is request right? Yes No Is EP0 stall? Yes Is assigned value valid? Yes No Is state valid? Yes Set alternate setting value to present transmitting data. Error transaction No
Finish transaction
End
92CF26A-467
2007-11-21
TMP92CF26A
(c-8) SYNCH_FRAME request transaction
Start
No Is request right? Yes Finish transaction Error transaction
End
(c-9) SET_DESCRIPTOR request transaction
Start
No Is request right? Yes Finish transaction Error transaction
End
92CF26A-468
2007-11-21
TMP92CF26A
(c-10)GET_DESCRIPTOR request transaction
Start
No Is request right? Yes No Is EP0 stall? Yes Is assigneed value valid? Yes No Is state valid? Yes No
Device Set device descriptor information.
Config Set config descriptor information.
String Set string descriptor information.
Error transaction
Write information to FIFO[EP0_fifowrite ( )]
End
92CF26A-469
2007-11-21
TMP92CF26A
(c-11) Data read transaction to FIFO by EP0
Start
No Is request right? Yes Stage information = data stage Read data from FIFO
STATUS_NAK interrupt enable
STATUS_NAK interrupt disable
Data read from FIFO
Stage information = status stage
All data number renew transfer address
Finish transaction
End
92CF26A-470
2007-11-21
TMP92CF26A
(c-12)Data write transaction to FIFO by EP0
Start
No Is request right? Yes Stage information = data stage Write data to FIFO STATUS_NAK interrupt enable Is data number a multiple of payload size? Set data size to SIZE register Yes STATUS_ NAK interrupt disable Write data to FIFO Stage information = status stage All data number renew former transfer address Finish transaction No Set transmitting size to SIZE register
End
92CF26A-471
2007-11-21
TMP92CF26A
(c-13)Initial setting transaction of microcontroller
Start
Interrupt disable
Set Stack point
Set Various interrupts
Clear vRAM
UDC initialization[UDC_INIT]
USB firmware initialization[USB_INIT]
Interrupt enable
Main transaction[main ( )]
(c-14)Initial setting transaction of UDC
Start
USBC reset transaction
End
92CF26A-472
2007-11-21
TMP92CF26A
(c-15)Initial transaction of USB number changing firmware
Start
Renew stage information Renew current information Renew support information
Invalid EP except EP0
Various flag Intialization
End
(c-16)Set DEVICE_ID data to DEVICE_ID of UDC
Start
Set DEVICE_ID data to DEVICE_ID_RAM area.
End
92CF26A-473
2007-11-21
TMP92CF26A
(c-17)Descriptor data set transaction
Start
Set descriptor data to DESC_RAM area.
End
(c-18)USB interrupt transaction
Start
Read INT register
Evaluate Interrupt
Setup interrupt transaction [Proc_SETUPINT]
Endpoint 0 interrupt [Proc_ ENDPOINT]
Status_NAK interrupt [Proc_STATUSNAKINT]
Status_interrupt [Proc_STATUSINT]
Others Error transaction
Evaluate Request transaction [STATUS_judge]
End
92CF26A-474
2007-11-21
TMP92CF26A
(c-19)Dummy function for not using maskable interrupts. * Transaction performs nothing, therefore outline flow is skipped.
(c-20)Request evaluation transaction. If transaction result is error, it initiates STALL command.
Start
No Is request right? Yes Error transaction
End
(c-21)SETUP stage transaction
Start
No Is request right? Yes Stage information = SETUP stage
Request transaction
End
92CF26A-475
2007-11-21
TMP92CF26A
(c-22)Perform endpoint 0 transaction except in SETUP stage.
Start
Evaluate Stage
Data stage GET system request [EP0_fifowrite] SET system request [EP0_fiforead]
Status stage Finish normally
Others Error transaction
End
(c-23)Status stage interrupt transaction
Start
No Status stage? Yes Normal finish transaction Error transaction
End
92CF26A-476
2007-11-21
TMP92CF26A
(c-24)STATUS_NAK interrupt transaction
Start
Data stage? Yes Normal finish transaction
No
Error transaction
End
(c-25)This transaction is a non-transaction for USB interrupts.
Start
92CF26A-477
2007-11-21
TMP92CF26A
(c-26)Getting descriptor information (related to standard request)
Start
Get device information on descriptor
Is config within support? Yes Get config information on descriptor
No
Interface is within support in config present.
No
Yes Get device information on descriptor
Increment count to next config information
End
92CF26A-478
2007-11-21
TMP92CF26A 3.16.11 Notice and Restrictions
1. Limitation of writing to COMMAND register in special timing When "STALL" command is issued, ENDPOINT status might shift to "INVALID". To avoid this problem, follow the routine below. a. BULK (IN/OUT) When issuing a STALL command to endpoint in BULK transfer, be sure to issue STALL command after stop RD/WR access to endpoint; that is UDC returns NAK in the response to token from host. INT_EPxNAK should be used to detect NAK transmit. b. CONTROL OUT with data stage (software response) If STALL needs to be set for endpoint 0 judging from request after receiving INT_SETUP interrupt, access SetupReceived register. After that, issue STALL command after detecting INT_ENDPOINT0 interrupt. c. CONTROL OUT without data stage (software response) If STALL needs to be set for endpoint 0 judging from request after receiving INT_SETUP interrupt, issue STALL command before access to eop register. d. CONTROL IN(software response) If STALL needs to be set for endpoint 0 judging from request after receiving INT_SETUP interrupt, issue STALL command before setting the first transmit data to host.
2.
Limitation of EPx_STATUS when executing USB_RESET command EPx_STATUS may indicate different condition, if a USB_RESET command is executed to the endpoint processing the token. To avoid this phenomenon, do not RESET the endpoint while transferring. (It is available when processing a request that needs USB_RESET to that endpoint.)
92CF26A-479
2007-11-21
TMP92CF26A
3.
When generating toggle error of device controller a. UDC operation If USB host fail to receive ACK transmitted from the UDC in OUT transfer, the USB host transmits the same data to the UDC again. When the FIFO is available to receive, the UDC detects toggle error because of detecting the same data(having the same toggle as the data which is received just before) and returns ACK. The UDC rejects it because the data have already been received normally. Meanwhile, if FIFO is not available, the UDC returns NAK and informs the USB host that is unable to receive.
4.
When using the USB device controller in the TMP92CF26A, a crystal oscillator is recommended (USB standard 10 MHz2500ppm). In this case, a maximum of 3 stages of external hub can be due to the precision of this USB device controller and the internal clock. If USB compliance (USB logo) is needed, the 5 stages connection is needed for external hub. And it is needed that input 48MHz clock from X1USB pin (USB standard 2500ppm.)
92CF26A-480
2007-11-21
TMP92CF26A
3.17 SPI Controller (SPIC)
The SPIC is a Serial Peripheral Interface Controller that supports only master mode. It can be connected to the SD card, MMC (Multi Media Card) etc. in SPI mode. Its features are summarized as follows: 1) On-chip 32-byte FIFOs for both transmission and reception 2) Generates the CRC-7 and CRC-16 values for transmission and reception 3) Baud Rate: 20 Mbps (max) 4) Can be connected to multiple SD cards and the MMC. (Since there is only oen chip select signal preassigned as SPCS, use other output ports to allow for more than two connections.) 5) Operates as the general synchronous SIO Selects the followings: MSB/LSB-first, 8/16-bit data length, rising/falling edge 6) Two types of interrupts: INTSPITX (Transmit interrupt), INTSPIRX (receive interrupt) Select Read/Mask for interrupts: RFUL, TEMP, REND and TEND
92CF26A-481
2007-11-21
TMP92CF26A 3.17.1 Block Diagram
Figure 3.17.1 shows a block diagram of the SPIC and its connections with a SD card.
SPIC (SPI Controller)
fSYS Baud Rate Generator SPCLK 100 K
SD Card
SCLK
16 bits
SPIST
SPIMD/CT
SPCS
100 K CS
16 bits
TX shift register
Transmitt/Receive Controller
TXFIFO
SPITD
8x32
Internal Data Bus
16 bits
SPDO
100 K DI
RX shift register
RXFIFO
SPIRD
8x32
16 bits
SPDI
100 K DO
16 bits
16 bits
SPICR
SPIIE
INTSPI
Port WP (Write Protect) INTn CD (Card Detect)
Note 1: The SPCLK, SPCS , SPDO and SPDI pins are configured as input ports (Ports PR3, PR2, PR1 and PR0) upon reset. Thus, these pins require pull-up resisters to fix their voltage levels. The pull-up resistor values should be adjusted under real-world conditions. Note 2: Any one of general inputs and interrupt should be used as the WP (Write Protect) and CD (Card Detect) inputs, respectively.
Figure 3.17.1 Block Diagram and Connection Example
92CF26A-482
2007-11-21
TMP92CF26A 3.17.2 Special Function Registers (SFRs)
This section describes the SFRs of the SPIC. These are connected to the CPU with 16 bit data buses. (1) SPIMD (SPI Mode Select register) The SPIMD register specifies the operating mode, clock operation, etc. SPIMD Register 7
SPIMD (820H) A readmodify-write operation cannot be performed Bit Symbol Read/Write Reset State Function SWRST W 0
Software Reset 1: Reset
6
XEN R/W 0
SYSCK 0: Disable
5
4
3
2
CLKSEL2 1
000: Reserved 001: fSYS/2 010: fSYS/3 011: fSYS/4
1
CLKSEL1 R/W 0
100: fSYS/8 101: fSYS/16 110: fSYS/64 111: fSYS/256
0
CLKSEL0 0
Select Baud Rate(Note1)
0: Don't care 1: Enable
15
(821H) Bit Symbol Read/Write Reset State Function 0
Test Mode 0:Disbale 1:Enable LOOPBACK
14
MSB1ST R/W 1
13
DOSTAT 1
SPDO Pin When Not Transmitting 0: Fixed to 0 1:Fixed to 1
12
11
TCPOL 0
-on Clock Edge Select for 0: Falling edge 1: Rising edge
10
RCPOL R/W 0
ion Clock Edge Select
9
TDINV 0
8
RDINV 0
Data Inversion
LOOPBACK Start Bit for Reception 0: LSB 1: MSB
Synchronizati Synchronizat Data
Transmission / State
Inversion for for Reception Transmissio 0: Disable 1: Enable 1: Enable
for Reception n0: Disable 1: rise
Transmission 0: fall
Note: The SD card of the TMP92CF26A supports a baud rate of up to 20 Mbps in SPI mode. The baud rate should be adjusted with the operating frequency of the CPU (fSYS) so that it does not exceed 20 MHz.
Figure 3.17.2 SPIMD Register (a) LOOPBACK Setting the XEN and LOOPBACK bits to 1 enables the internal SPDO output to be internally connected to the SPDI input. This setup can be used for testing. Also, a clock sigal is generated from the SPCLK pin, regardless of whether data transmission or receptionis in progress. Data transmission or reception must not be performed while changing the state of this bit.
Data Transmission SPDO pin
B Data Reception Y A SPDI pin
SPIMD
Figure 3.17.3 LOOPBACK Bit Configuration
92CF26A-483
2007-11-21
TMP92CF26A
(b) MSB1ST This bit specifies whether to transmit/receive byte with the MSB first or with the LSB first. Data transmission or reception must not be performed while changing the state of this bit. (c) DOSTAT This bit specifies the status of the SPDO pin of when data transmission is not performed (i.e., after completing data transmission or during data reception). Data transmission or reception must not be performed while changing the state of this bit. (d) TCPOL This bit specifies the polarity of the active edge of the synchronization clock for data transmission. The XEN bit should be cleared to 0 for changing the state of this bit. At the same time, RCPOL should also be cleared to 0.
SPCLK pin (TCPOL = 0) SPCLK pin (TCPOL = 1) SPDO pin MSB Bit 1 Bit 2 Bit 3 Bit 4 Bit 7
LSB Bit 0
Figure 3.17.4 Timing Diagram of Data Transmissions Controlled by the TCPOL Bit (e) RCPOL This bit specifies the polarity of the active edge of the synchronization clock for data reception. The SPIMD bit should be cleared to 0 for changing the state of this bit. TCPOL should also be cleared to 0.
SPCLK pin (RCPOL = 0) SPCLK pin (RCPOL = 1) SPDI pin LSB Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 MSB Bit 7
Figure 3.17.5 Timing Diagram of Data Receptions Controlled by the TCPOL Bit (f) TDINV This bit specifies whether to logically invert the data transmitted from the SPDO pin or not. Data transmission or reception must not be performed while changing the state of this bit. (g) RDINV This bit specifies whether to logically invert the data received from the SPDI pin or not. Data transmission or reception must not be performed while changing the state of this bit.
92CF26A-484
2007-11-21
TMP92CF26A
(h) SWRST This bit is used to performs a software reset of the read and write pointers for data transmission and reception. Stop the data transmission after writing a 0 to the SPICT bit where XEN = 1. Then, write a 1 to the SWRST bit to initialize the read and write pointers of transmit and receive FIFO buffers. Writing a 0 to the SPICT bit stops data transmission after transmitting the UNIT data that is currently being transmitted. Then, writing a 1 to the SWRST bit invalidate the data in the transmit FIFO buffer. Therefore, the data is not output even if the data transmission is restarted after performing a software reset.Do not write a 1 to the SWRST bit in the middle of data transmission. In case of performing data reception, the received data contained in the receive FIFO buffer becomes invalid. However, when performingSequential-mode data reception, data reception continues even if the data in the receive FIFO buffer becomes invalid. Therefore, stop data reception by writing a 0 to the SPICT bit after receiving the data that is currently being received. Then, (after confirming there is no UNIT data currently being received, or ) the receive operation can be stopped completely by writing a 1 to the SWRST bit after checking no UNIT data in receiving (namely after REND interrupt or the time to receive 1UNIT). Do not write a 1 to the SWRST bit during a data reception. Software reset can be performed in a single-shot operation, which is to write a 1 to the SWRST bit (it is not required to write a 0 to the SWRST bit). Simultaneous writing of 1s to the XEN and SWRST bits is also supported. (i) XEN This bit enables or disables the internal clock signal. Always set this bit to 1 when using the SPI controller. (j) CLKSEL2:0 This bti selects the baud rate. The baud rate is generated using the system clock fSYS and is programmable as shown below according to the system clock settings. Data transmission or reception must not be performed while changing the state of these bits
Note: The SD card of the TMP92CF26A supports a baud rate of up to 20 Mbps. This field should be programmed so that SPCLK signal does not exceed 20 MHz When setting the baud rates, select less than 20 Mbps according to the operation speed of CPU (fSYS).
Table 3.17.1 Example of Baud Rate
Baud Rate [Mbps] fSYS/2 fSYS /3 fSYS /4 fSYS /8 fSYS /16 fSYS /64 fSYS /256 fSYS = 60 MHz - 20 15 7.5 3.75 0.9375 0.234375 fSYS = 80 MHz - - 20 10 5 1.25 0.3125
92CF26A-485
2007-11-21
TMP92CF26A
(2) SPI Control Register (SPICT) The SPICT register specifies data length, CRC, etc. SPICT Register 7
SPICT (822H) Bit Symbol Read/Write Reset State Function
on Control 0: Disable 1: Enable
6
SPCS_B 1
5
UNIT16 0
Select 0: 8 bits 1: 16 bits
4
TXMOD R/W 0
Transmit 0: UNIT
3
TXE 0
2
FDPXE 0
Enable in Fullduplex mode 0: Disable 1: Enable
1
RXMOD 0
Receive 0: UNIT
0
RXE 0
Receive 0: Disable
CEN 0
Communicati- SPCS Pin Data Length Control 0: Set to "0" 1: Set to "1"
Transmission Alignment 0: Disable
Mode Select Enable 1: Sequential 1: Enable
Mode Select Enable 1: Sequential 1: Enable
15
Bit Symbol (823H) Read/Write Reset State Function 0 0: CRC7 1: CRC16
14
R/W 0
13
12
11
10
9
8
CRC16_7_B CRCRX_TX_B CRCRESET_B
0 CRC
CRC Select CRC Data
0: Transmit Calculation 1: Receive Register Control 0: Reset 1:Reset Release
Figure 3.17.6 SPICT Register (a) CRC16_7_B This bit selects the CRC calculation algorithm from the CRC7 and CRC16. (b) CRCRX_TX_B This bit selects the data to be sent to the CRC generator. When CRCRX_TX_B = 0, the CRC calculation is performed on the transmit data. Otherwise, it is performed on the received data. (c) CRCRESET_B This bit is used to initialize the CRC calculation register.
92CF26A-486
2007-11-21
TMP92CF26A
This section describes how to calculate the CRC16 of the transmit data and to append the calculated CRC value at the end of the transmit data. Figure 3.17.7 below illustrates the flow chart of the CRC calculation procedures.
(1) Program the SPICT bit to select the CRC algorithm from CRC7 and CRC16. Then, also program the CRCRX_TX_B bit to specify the data on which the CRC calculation is performed. (2) To reset the SPICR register, write a 0 to the CRCRESET_B bit and then write a 1 to the same bit. (3) Load the SPITD register with the transmit data, and wait until transmission of all data is completed. (4) Read the SPICR register and obtain the result of the CRC calculation. (5) Transmit the CRC obtained in step (4) in the same way as step (3).
The CRC calculation on the receive data can be performed in the same procedures.
Start
CRC16_7_B = 1, CRCRX_TX_B = 0
CRCRESET_B = 01
Transmit all data
Read CRC from SPICR Write CRC in SPITD and send
Finish
Figure 3.17.7 Flow Chart of the CRC Calculation Procedures
92CF26A-487
2007-11-21
TMP92CF26A
(d) CEN This bit enables or disables the pins for the SD card and MMC connections. When the card is not inserted or when it is not powered on, a shoot through current might flow in the SPDI pin, for it enters the floating state. Also, currents may unintentionally flow into the card from the SPCS , SPCLK and SPDO pins when they generate a logic 1. This bit can be used to avoid these problems. If write to "0" with PRCR and PRFC selecting SPCS , SPCLK, SPDO and SPDI signal, SPDI pin is prohibited to input (avoiding penetrated current) and SPCS , SPCLK, SPDO pin become high impedance. When writing a 1 to the CEN bit, ensure that a card is properly inserted and powered on, as well as that the clock signal is supplied to the SPIC (SPIMD = 1). (e) SPCS_B This bit specified the logic stateof the SPCS output. (f) UNIT16 This bit selects the data length for transmission and reception. The data length is hereafter refered to as the UNIT. Data transmission or reception must not be performed while changing the state of this bit (g) FDPXE This bit should be set to 1 when performing the full-duplex communication. This bit specifies whether to align the transmit and receive data on the UNIT-size boundaries. Data transmission or reception must not be performed while changing the state of this bit. (h) TXMOD This bit selects the data transmission mode from UNIT and Sequential modes. During transmission, it is prohibited to change the transmission mode from Sequential to UNIT, or vice versa. For UNIT-mode transmission, the transmit FIFO buffer is disabled. The TEMP interrupt is generated when the data is loaded from the transmit data register (SPITD) to the transmit shfit register. For sequential-mode transmission, the 32-byte FIFO is enabled. The TEMP interrupt is generated when the empty space of the FIFO becomes 16 bytes or 32 bytes. (i) TXE This bit enables or disables data transmission. Data transmission is started when this bit set to 1 after loading the transmit data into the transmit FIFO, or when loading the transmit data to the transmit FIFO when this bit is already set to 1. The state of this bit can be changed even during data transmission. If this bit is cleared to 0 during a data transmission, the transmission is stopped after completing the transmission of the UNIT data currently being transmitted.
92CF26A-488
2007-11-21
TMP92CF26A
Important Note: When in UNIT mode (TXMOD = 0), the following restriction is imposed on the system operation. When the SPICT bit is set to 1, the state of any bits must not be changed until the data transmission is completed.
Sample Program 1: LD DI SET 3, Wait: BIT 1, JPZ, RES 3, EI Sample Program 2 (Recommend): Check the transmission end flag. (SPIST = 1) LD DI SET 3, RES 3, EI (SPICT) (SPICT) (SPITDx), A ; Load "A" the tranmit data ; Disable the interrupt ; Start transmission be setting the TXE bit to 1 ; Disable the transmission by clearing the TXE bit to 0 ; Enable the interrupt (SPICT) (SPIST) Wait (SPICT) ; Disable the transmission by clearing the TXE bit to 0 ; Enable the interrupt (SPITDx), A ; Load the tranmit data ; Disable the interrupt ; Start transmission by setting the TXE bit to 1 ; Wait for the completion of the transmission
(j) RXMOD This bit selects the data reception mode from UNIT and Sequential modes. During reception, it is prohibited to change the reception mode from Sequential to UNIT, or vice versa. For UNIT-mode reception, the receive FIFO buffer is disabled and the RFUL interrupt is generated when the received data is loaded from the receive shift register to the receive data register (SPIRD). For sequential-mode reception, the 32-byte receive FIFO is enabled and the RFUL interrupt is generated when the size of received data stored in the receive FIFO reaches 16 or 32 bytes.
92CF26A-489
2007-11-21
TMP92CF26A
(k) RXE In the UNIT-mode reception, writing a 1 to this bit enables the reception of only one UNIT-size data. When reading the receive data register (SPIRD) while this bit is kept enabled, one more UNIT data is additionally received. In Sequential mode, writing a 1 to this bit enables the sequential data reception until the 32-byte FIFO buffer becomes full. The state of this bit can be changed even during the data reception. If this bit is cleared to 0 during a data reception, the reception is stopped after completing the reception of the UNIT data currently being received.
[Data Transmission/Reception Modes] This SPI Controller supports six operating modes as listed below. These are specified by the FDPXE, RXMOD, RXE, TXMOD, TXE bits. Table 3.17.2 Data Transmission Reception Modes Operatiing Mode
(1) UNIT transmission (2) Sequential transmission (3) UNIT reception (4) Sequential reception (5) UNIT transmission and reception (6)Sequential transmission and reception 1 1 1 1 1 0 0 0 0 1 0 1 x x 0
Bit Settings
1 1 x x 1 x x 0 1 0 x x 1 1 1
Description
Transmit the SPITD data per UNIT Transmit the FIFO data sequentially Receive only one UNIT-size data Automatically receive data if FIFO buffer has any empty space Transmit/receive one UNIT-size data with the addresses of transmit/receive data aligned on UNIT-size boundaries Transmit/receive data sequentially with the addresses of transmit/receive data aligned on UNIT-size boundaries
x: Don't care
92CF26A-490
2007-11-21
TMP92CF26A
Differences Between the UNIT-mode and Sequential-mode transmissions The UNIT mode for the data transmission can be selected by writing a 0 to the SPICT bit. The transmit FIFO buffer is disabled in UNIT mode. The UNIT-mode transmission starts when the UNIT-size data is loaded into the SPITD register where SPICT = 1, or when the SPICT is set to 1 after loading one UNIT-size data into the SPITD register. During the data transmission, it is prohibited to change the transmission mode from Sequential to UNIT, or vice versa. In the UNIT-mode transmisison, the TEMP interrupt is generated when the transmit data is loaded from the transmit data register (SPITD) to the transmit shift register. Also, the TEND interrupt is generated upon completion of the transmission of the last UNIT data. Important Note: In case of using UNIT mode: TXMOD=0, there is one restriction. Don't touch to all other SFRs, TXE=1 and UNIT transmission will finish completely.
Program Sample1: LD DI SET 3, Wait: BIT 1, JPZ, RES 3, EI Program Sample2 (Recommend): Check to transmission end flag! (SPIST=1) LD DI SET 3, RES 3, EI (SPICT) (SPICT) (SPITDx), A ; "A" is tranmission data ; Disable Interrupt ; TXE=1: Enable and Start ; TXE=0: Disable ; Enable Interrupt (SPICT) (SPIST) Wait (SPICT) ; TXE=0: Disable ; Enable Interrupt (SPITDx), A ; "A" is tranmission data ; Disable Interrupt ; TXE=1: Enable and Start ; Wait to finish transmission
The Sequential mode for the data transmission can be selected by writing a 1 to the SPICT bit. The 32-byte FIFO is enabled in Sequential mode. In this mode, the data writes to the transmit FIFO must be performed in 16-byte units. Otherwise, the TEMP interrupt is not properly generated. In the Sequential-mode transmission, transmit data written into the SPITD is loaded sequentially when SPICT = 1. The transmission in this mode can also be started by setting the SPICT bit to 1 after writing the transmit data into the transmit FIFO. The transmit data is transmitted in the same order as they were written into the FIFO. This mode of transmission keeps transmitting data as long as the transmit data exists. Therefore, the Sequential-mode transmission continues as long as the transmit FIFO (32 bytes) has any valid data. During the data transmission, it is prohibited to change the transmission mode from Sequential to UNIT, or vice versa.
92CF26A-491
2007-11-21
TMP92CF26A
The state of the SPICT bit can be changed even during the data transmission. Writing a 0 to the SPICT bit during a transmission stops the transmission after completing the transmission of the UNIT data currently being transmitted. The TEMP interrupt is generated when the empty space size of the FIFO becomes 16 or 32 bytes. The TEND interrupt is generated upon completion of the transmission of the last UNIT data.
92CF26A-492
2007-11-21
TMP92CF26A
Differences Between the UNIT-mode and Sequential-mode Receptions The UNIT-mode reception receives only one UNIT-size data. The UNIT mode for the data reception can be selected by writing a 0 to the SPICT bit. The receive FIFO is disabled in UNIT mode. Writing a 1 to the SPICT bit initiates a receive operation of one UNIT data. Then, the transmission is terminated after storing the received data into the receive data register (SPIRD). To perform one-UNIT data reception, read the SPIRD register after writing a 0 to the SPICT bit. If the SPIRD register is read again when the SPICT bit is set to1, one-UNIT data is additionally received. During the data reception, it is prohibited to change the reception mode from Sequential to UNIT, or vice versa. In this mode, the RFUL and REND interrupts are generated when the receive data is loaded into the SPIRD register from the receive shift register. The Sequential-mode reception automatically receives the data as long as the receive FIFO has any empty space. The Sequential mode is selected by writing a 1 to the SPICT bit.The 32-byte receive FIFO is disabled in this mode. In this reception mode, the data reads from the receive FIFO must be performed in 16-byteunits. Otherwise, the RFUL interrupt is not properly generated. Received data is stored into the receive FIFO by writing a 1 to the SPICT bit. This mode of receptionkeeps receiving the next data automatically unless the data receive FIFO becomes full (32 bytes). Therefore, the reception continues sequentially without stopping at every UNIT-sized reception. During the data reception, it is prohibited to change the reception mode from Sequential to UNIT, or vice versa. Writing a 0 to the SPICT bit during a receptionstops the data reception after completingthe reception of the UNIT data currently being received. The RFUL interrupt is generated when the size of data stored into the FIFO reaches 16 or 32 bytes. The REND interrupt is generated when the 32-byte receive FIFO becomes full.
92CF26A-493
2007-11-21
TMP92CF26A
Transmit and Receive Operation When performing a data transmissionand reception simultaneously, the FDPXE bit must be set to 1. Write a 1 to the SPICT bit after writing a 1 to the FDPXE bit to put the receiver into standby mode for the UNIT-mode reception. Writing a 1 to the SPICT bit after writing a 1 to the bit does not immediately initiate the receive operation. This is because the data to be transmitted at the same time has not been prepared. Transmit and receive operation is started only after the transmit data is written into the SPITD register where SPICT = 1. The figure below shows the operations of the receiver and transmitter for the simultaneous transmit and receive operation.: Start receiving Receiver SPCLK output SPDI input
LSB Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6
Start transmitting
Transmitter SPCLK output SPDO output
LSB Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7
Note: If the data transmission and reception are not performed simultaneously, data communication should be performed with the FDPXE bit cleared to 0.
Figure 3.17.8 Transmit and Receive Operation
92CF26A-494
2007-11-21
TMP92CF26A
(3) Interrupts The SPIC generates two types of interrupt requests to the Interrupt Controller (INTC), which are the transmit interrupt (INTSPITX) and receive interrupt (INTSPIRX) requests. Also, the SPIC has four types of interrupts; two for transmission and two for reception. (a) Transmit interrupts TEMP (Transmit FIFO Empty interrupt) and TEND (Transmit End interrupt) As for the TEMP interrupt, the timing of the interrupt generation differs depending on the transmission mode, which is UNIT or Sequential. In the Sequencial-mode transmission, the data writes to the transmit FIFO must be performed in 16-byte units. Otherwise, the TEMP interrupt is not properly generated. UNIT-mode transmission Since the transmit FIFO is disabled in this mode, the TEMP interrupt is generated when the data written in the transmit data register (SPITD) is loaded into the transmit shift register. The TEND interrupt is generated when the transmission of the last UNIT data is completed with the FIFO being empty (i.e., after the falling edge of the last bit clock where SPIMD = 0). Sequential-mode transmission The TEMP interrupt is generated by the following two conditions: One is when the empty space size of the transmit FIFO reaches 16 bytes, and the other is when it reaches 32 bytes. The TEND interrupt is generated when the transmission of the last UNIT data is completed with the FIFO being empty (i.e., after the falling edge of the last bit clock where SPIMD = 0). (b) Receive interrupts RFUL (Receive FIFO interrupt) and REND (Receive End interrupt). As for the RFUL interrupt, the timing of the interrupt generation differs depending on the reception mode; which is UNIT or Sequential. In the Sequencial-mode transmission, the data reads from the receive FIFO must be performed in 16-byte units. Otherwise, the RFUL interrupt is not properly generated. UNIT-mode reception Since the receive FIFO is disabled in this mode, the RFUL interrupt is generated at the same timing as the REND interrupt is generated. The RFUL and REND interrupts are generated when the data is loaded from the receive shift register into the receive data register (SPIRD). Sequential-mode reception The RFUL interrupt is generated by the following two conditions: One is when the size of data stored into the receive FIFO reaches 16 bytes, and the other is when it reaches 32 bytes. The REND interrupt is generated when the 32-byte receive FIFO becomes full.
92CF26A-495
2007-11-21
TMP92CF26A
(3-1) SPI Status Register (SPIST) The SPIST register contains three bits that indicates the status of data communication. SPIST Register 7
SPIST (824H) Bit Symbol Read/Write Reset State Function
FIFO Status 0: No empty space 1: Hasan empty space
6
5
4
3
TEMP R 1
Transmit
2
1
TEND R 1
Status 0: in progress or having 1: ended
0
REND 0
Status 0: Reception or not having receive data Ended or
Transmission Reception
Transmission in progress
transmit data 1: Reception Transmission FIFO full
15
(825H) Bit Symbol Read/Write Reset State Function
14
13
12
11
10
9
8
Figure 3.17.9 SPIST Register (a) TEMP For UNIT-mode transmission, this bit is cleared to 0 when the transmit register (SPITD) contains valid data; otherwise, it is set to 1. For Sequential-mode transmission, this bit is set to 1 when the transmit FIFO buffer contains no valid data. (b) TEND This bit is cleared to 0 when the SPITD register or the transmit FIFO contains valid transmit data, and also when the transmission is in progress. This bit is set to 1 after completing the data transmission where the SPITD register and the transmit FIFO contain no valid data. (c) REND For UNIT-mode reception, this bit is set to 1 when completing the data reception and valid data is stored into the receive data register (if there is any valid data). This bit is cleared to 0 when the receive register (SPIRD) contains no valid data, or when the reception is in progress. For Sequential-mode reception, this bit is set to 1 when the 32-byte receive FIFO is full with the valid data after completing the reception of the last data. This bit is cleared to 0 when there is still an empty space of one byte or more in the FIFO. The RFUL flag does not exist because its function is exactly the same as the REND flag.
92CF26A-496
2007-11-21
TMP92CF26A
(3-2) SPI Interrupt Enable Register (SPIE) The SPIIE register enables or disables the generation of four types of interrupts. SPIIE Register 7
SPIIE (82CH) Bit Symbol Read/Write Reset State Function 0 TEMP interrupt 0:Disable 1:Enable 0 RFUL interrupt 0:Disable 1:Enable
6
5
4
3
TEMPIE
2
RFULIE R/W
1
TENDIE 0 TEND interrupt 0:Disable 1:Enable
0
RENDIE 0 REND interrupt 0:Disable 1:Enable
15
(82DH) Bit Symbol Read/Write Reset State Function
14
13
12
11
10
9
8
Figure 3.17.10 SPIIE Register (a) TEMPIE This bit enables or disables the TEMP interrupt. (b) RFULIE This bit enables or disables the RFUL interrupt. (c) TENDIE This bit enables or disables the TEND interrupt. (d) RENDIE This bit enables disables the REND interrupt.
Note: The SPIC supports four types of interrupts; two transmit interrupts (TEMP,and TEND, both of which causes the generation of the INTSPITX interrupt request) and two receive interrupts (RFUL and REND, both of which causes the generation of the INTSPIRX interrupt request). However, for the proper operation, select either one of the TEMP and TEND interrupts and also select either one of the RFUL and REND interrupts. (Simultaneous use of the TEMP and TEND interrupts is prohibited, as well as the simultaneous usage of the RFUL and REND interruptsy.)
92CF26A-497
2007-11-21
TMP92CF26A
(4) SPI CRC Register (SPICR) The SPICR register contains the CRC calculation result for transmit/receive data. SPICR Register 7
SPICR (826H) Bit Symbol Read/Write Reset State Function 0 0 0 0 CRCD7
6
CRCD6
5
CRCD5
4
CRCD4 R
3
CRCD3 0
2
CRCD2 0
1
CRCD1 0
0
CRCD0 0
CRC result bits [7:0]
15
(827H) Bit Symbol Read/Write Reset State Function 0 CRCD15
14
CRCD14 0
13
CRCD13 0
12
CRCD12 R 0
11
CRCD11 0
10
CRCD10 0
9
CRCD9 0
8
CRCD8 0
CRC result bits [15:8]
Figure 3.17.11 SPICR Register (a) CRCD15:0 The CRC result which is calculated according to the settings of the CRC16_7_b, CRCRX_TX_B and CRCRESET_B bits in the SPICT register are loaded into this register. When using the CRC16 algorithm, all the bits participate in the CRC generation. When using the CRC7 algorithm, only the lower seven bits participates in the CRC generation. The following describes the steps required to calculate the CRC16 for the transmit data. First, initialize the CRC calculation register by writing a 1 to the CRCRESET_B bit after programming three bits as follows: CRC16_7_b = 1, CRCRX_TX_B = 0, and CRCRESET_B = 0. Then, by writing the transmit data into the SPITD register, complete the transmission of all bits, for which the CRC should be calculated. The SPIST bit should be checked to confirm whether the reception is completed. By reading the SPICR register after the transmission is completed, the CRC16 for the transmit data can be obtained.
Note: The CRC is generated upon data input and output of the TMP92CF26A as illustrated below. The timing of the CRC comparison should be fully considered when performing Sequential-mode transmit and receive operation using the FIFOs.
TMP92CF26A Transmitt/Receive Controller
TX shft register
SPI Slave
TX FIFO
SPITD
8x32
16 bits
SPDO
100 K DI
RX FIFO
RX shift register
SPIRD
16 bits
8x32
Internal Data Bus
SPDI
100 K DO
CRC generation timing
92CF26A-498
2007-11-21
TMP92CF26A
(5) SPI Transmit Data Register (SPITD) The SPITD0 and SPITD1 registers are used for writing the transmit data. SPITD0 Register 7
SPITD0 (830H) Bit Symbol Read/Write Reset State Function 0 0 0 0 TXD7
6
TXD6
5
TXD5
4
TXD4 R/W
3
TXD3 0
2
TXD2 0
1
TXD1 0
0
TXD0 0
Transmit data bits [7:0]
15
(831H) Bit Symbol Read/Write Reset State Function 0 TXD15
14
TXD14 0
13
TXD13 0
12
TXD12 R/W 0
11
TXD11 0
10
TXD10 0
9
TXD9 0
8
TXD8 0
Transmit data bits [15:8]
SPITD1 Register 7
SPITD1 (832H) Bit Symbol Read/Write Reset State Function 0 0 0 0 TXD7
6
TXD6
5
TXD5
4
TXD4 R/W
3
TXD3 0
2
TXD2 0
1
TXD1 0
0
TXD0 0
Transmit data bits [7:0]
15
(833H) Bit Symbol Read/Write Reset State Function 0 TXD15
14
TXD14 0
13
TXD13 0
12
TXD12 R/W 0
11
TXD11 0
10
TXD10 0
9
TXD9 0
8
TXD8 0
Transmit data bits [15:8]
Figure 3.17.12 SPITD Register This register is used for writing the transmit data. When this register is read, the last-written data is read out. This register is overwritten if the next data is written with the transmit FIFO being full. Since the transmit data registers can contain data of up to four bytes, it can support write operations that are performed by using four-byte instructions, such as the parallel operation of the SPI and DMA. When writing the data, the transmit data at the address 830 must always be the first to be written. There are several restrictions of the data writing methods (i.e., instructions to be used). For more details, please refer to the following table.
UNIT-mode Transmission Transmit Data Write Size Instruction Example (FIFO Disabled) 1-byte transmission unit16 = 0 1-byte write 2-byte write 4-byte write ld (0x830),a ld (0x830),wa ld (0x830),xwa 2-byte transmission unit16 = 1 Sequential-mode Transmission (FIFO Enabled) 1-byte transmission unit16 = 0 Prohibited 2-byte transmission unit16 = 1
* *
* *

*
: All data that are written by the CPU are transmitted.
*: Invalid data are also transmitted along with the data written by the CPU.
92CF26A-499
2007-11-21
TMP92CF26A
(6) SPI Receive Data Register (SPIRD) The SPIRD0 and SPIRD1 registers are used for reading the received data. SPIRD0 Register 7
SPIRD0 (834H) Bit Symbol Read/Write Reset State Function 0 0 0 0 RXD7
6
RXD6
5
RXD5
4
RXD4 R
3
RXD3 0
2
RXD2 0
1
RXD1 0
0
RXD0 0
Receive data bits [7:0]
15
(835H) Bit Symbol Read/Write Reset State Function 0 RXD15
14
RXD14 0
13
RXD13 0
12
RXD12 R 0
11
RXD11 0
10
RXD10 0
9
RXD9 0
8
RXD8 0
Receive data bits [15:8]
SPIRD1 Register 7
SPIRD1 (836H) Bit Symbol Read/Write Reset State Function 0 0 0 0 RXD7
6
RXD6
5
RXD5
4
RXD4 R
3
RXD3 0
2
RXD2 0
1
RXD1 0
0
RXD0 0
Receive data bits [7:0]
15
(837H) Bit Symbol Read/Write Reset State Function 0 RXD15
14
RXD14 0
13
RXD13 0
12
RXD12 R 0
11
RXD11 0
10
RXD10 0
9
RXD9 0
8
RXD8 0
Receive data bits [15:8]
Figure 3.17.13 SPIRD Register This register is used for reading the received data. Please check the state of the RFUL or REND bit before starting a read operation. Since the receive data registers can contain data of up to four bytes, it can support read operations that are performed by using four-byte instructions, such as the parallel operation of the SPI and DMA. When reading the data, the receive data at the address 834 should be the first to be read. (There are some exceptions.) There are several restrictions of the data reading methods (i.e., instructions to be used). For mode details, please refer to the following table.
Receive Data Read Size Instruction Example UNIT-mode Reception (FIFO Disabled) 1-byte 2-byte reception reception unit16 = 1 unit16 = 0 Sequential-mode Reception (FIFO Enabled) 1-byte 2-byte reception reception unit16 = 0 unit16 = 1 Prohibited Prohibited Prohibited Prohibited
1-byte read 2-byte read 4-byte read
ld a,(0x834) ld a,(0x835) ld wa,(0x834) ld xwa,(0x834)
*
*1 *2

*3


: Only the valid data are read when the CPU is reading.
: Valid data + invalid data are read when the CPU is reading. Invalid data must be deleted later. *: Only the invalid data are read when the CPU is reading.
*1: Address 834 = Valid data, address 835 = Invalid data, *2: Address 834 = Valid data, address 835 = Invalid data, address 836 = Invalid data, address 837 = Invalid data *3: Address 834 = Valid data, address 835 = Valid data, address 836 = Invalid data, address 837 = Invalid data
92CF26A-500
2007-11-21
TMP92CF26A 3.17.3 Notes on the Operations Using the FIFO Buffers
Things to be noted when using the SPIC are as follows: 1) Transmission The transmit FIFO buffer is overwritten if the new data is written with the transmit FIFO buffer being full. Also, since the FIFO write pointer does not point to the correct write position, interrupts and transmissions are not properly executed. Therefore, the number of writes should be controlled by using software. In the Sequential-mode transmission, the data writes to the transmit FIFO must be performed in 16-byte units. Otherwise, the TEMP interrupt is not properly generated.
Note: For data transmission in units of other than 16 bytes, UNIT mode must be selected.
2) Reception If a read operation is performed when the receive FIFO is empty, undefined data is read. Also, since the FIFO read pointer does not point to the correct read position, interrupts and receptions are not properly executed. Therefore, the number of reads should be controlled by using software. In the Sequential-mode reception, the data reads from the receive FIFO must be performed in 16-byte units. Otherwise, the RFUL interrupt is not properly generated.
Note: For data reception in units of other than 16 bytes, UNIT mode must be selected.
3) CRC The CRC is generated upon transmission and reception to/from the SPI slave device. (Refer to the section on the SPICRC register fro more details.) The timing of the CRC comparison should be fully considered when performing Sequential-mode transmit and receive operation using the FIFOs. Example: Sequential-mode reception 1. Start Sequential-mode reception 2. finish valid data receive (FIFO_Full) 3. Stop data reception 4. Read valid data from the FIFO to a temporary buffer (internal RAM, etc.) 5. Read CRC1 from the CRC generator in the SPIC 6. Start CRC2 reception (upon UNIT-mode reception from the SD-CARD) 7. Compare CRC1 and CRC2
Note: The steps 2 to 4 of the above sequence can be used DMAC. However, to perform the CRC comparison, the receive operation must be stopped once as described in step 3. Otherwise, the CRC1 value obtained from the internal CRC generator unintentionally contains CRC2 as well as the valid data, which leads to an incorrect CRC comparison.
92CF26A-501
2007-11-21
TMP92CF26A
3.18 I2S (Inter-IC Sound)
The TMP92CF26A incorporates serial output circuitry that is compliant with the I2S format. This function enables the TMP92CF26A to be used for digital audio systems by connecting an LSI for audio output such as a DA converter. The I2S unit has the following features: Table 3.18.1 I2S Operation Features Item
Number of Channels Format 2 channels I S-format compliant Right-justified and left-justified formats supported Stereo / monaural Master transmission only Pins used 1. I2SnCKO (clock output) 2. I2SnDO (output) 3. I2SnWS (Word Select output) WS frequency Data transfer rate Transmission buffer Direction of data Data length Clock edge Interrupt Refer to "Setting the transfer clock generator and Word Select signal". 64 bytes x 2 MSB-first or LSB-first selectable 8 bits or 16 bits Rising edge or falling edge INTI2Sn (64-byte FIFO empty interrupt)
2
Description
92CF26A-502
2007-11-21
TMP92CF26A 3.18.1 Block Diagram
The I2S unit contains two channels: channel 0 and channel 1. Each channel can be controlled and made to output independently. Figure 3.18.1 shows a block diagram for I2S channel 0.
I2S0CTL fSYS fI2S Counter Stop 8-bit Counter I2SCKO Stop
I2S0CTL I2SCKO Invert I2S0CKO
I2S0CTL 6-bit Counter I2S0C I2S0C Clock Generator
I2S0CTL I2SWS Control I2S0WS
I2S0CTL
INTI2S0
Internal Data Bus
I2SBUF0
01
31
01
31
Data Selector Interrupt Control I2S0DO
32bit
64-byte FIFO0 (2 bytesx32)
64-byte FIFO1 (2 bytesx32)
FIFO Control
Write Pointer Read Pointer
I2S0CTL
Request Signal Output to ADC (Supported in channel 0 only)
2 Figure 3.18.1 I S Block Diagram
92CF26A-503
2007-11-21
TMP92CF26A 3.18.2 SFRs
The I2S unit is provided with the following registers. These registers are connected to the CPU via a 32-bit data bus. The transmission buffers I2S0BUF and I2S1BUF must be accessed using 4-byte load instructions. I2S0 Control Register 7
I2S0CTL (1808H) bit Symbol Read/Write Reset State Function 0 0: Stop 1: Start TXE0 R/W 0 control 0: Clear 1: Start 0
start bit
6
*CNTE0
5
4
DIR0
3
BIT0 0 0: 8 bits 1: 16 bits
2
DTFMT01 R/W
1
DTFMT00 0
0
SYSCKE0 0 System clock 0: Disable 1: Enable
Transmission Counter
Transmission Bit length
0 Output format 00: I S 10: Right
2
0:MSB 1:LSB
01: Left 11: Reserved
15
(1809H) bit Symbol Read/Write Reset State Function CLKS0 R/W 0 Source clock 0: fSYS 1: fPLL
14
13
12
FSEL0 R/W 0 Stereo /monaural 0: Stereo
11
TEMP0 R 1
FIFO state
10
WLVL0 0
9
EDGE0 R/W 0
8
CLKE0 0
Transmission WS level
Data output Clock (after transmission) 0: Enable 1: Disable
0: Low left clock edge operation 1: High left 0: Falling 1: Rising
0: Data
1: Monaural 1: No data
I2S0 Divider Value Setting Register 7
I2S0C (180AH) bit Symbol Read/Write Reset State Function 0 0 0 0 CK07
6
CK06
5
CK05
4
CK04 R/W
3
CK03 0
2
CK02 0
1
CK01 0
0
CK00 0
Divider value for CK signal (8-bit counter)
15
(180BH) Bit symbol Read/Write AReset State Function
14
13
WS05 0
12
WS04 0
11
WS03 R/W 0
10
WS02 0
9
WS01 0
8
WS00 0
Divider value for WS signal (6-bit counter)
I2S0 Buffer Register
15 I2S0BUF (1800H) A readmodifywrite operation cannot be performed bit Symbol Read/Write Reset State Function
B031 B030 B09 B028 B027 B026 B025 B024 B023 B022 B021 B020 B019 B018 B017 B016
14
B014
13
B013
12
B012
11
B011
10
B010
9
B009
8
B008
7
B007
6
B006
5
B005
4
B004
3
B003
2
B002
1
B001
0
B000
bit Symbol Read/Write Reset State Function
B015
W Undefined Transmission buffer register (FIFO) 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
W Undefined Transmission buffer register (FIFO)
Figure3.18.2 I2S Channel 0 Control Registers
92CF26A-504
2007-11-21
TMP92CF26A
The I2S unit is provided with the following registers. These registers are connected to the CPU via a 32-bit data bus. The transmission buffers I2S0BUF and I2S1BUF must be accessed using 4-byte load instructions. I2S1 Control Register 7
I2S1CTL bit Symbol (1818H) Read/Write Reset State Function 0 0: Stop 1: Start TXE1 R/W 0 control 0: Clear 1: Start 0 start bit 0: MSB 1: LSB 0 0: 8 bits 1:16 bits
2
6
*CNTE1
5
4
DIR1
3
BIT1
2
DTFMT11 R/W 0 Output format 00: I S 01: Left
1
DTFMT10 0 10: Right clock
0
SYSCKE1 0 System
Transmission Counter
Transmission Bit length
11:Reserved 0: Disable 1: Enable
15
(1819H) bit Symbol Read/Write Reset State Function CLKS1 R/W 0 Source clock 0: fSYS 1: fPLL
14
13
12
FSEL1 R/W 0 Stereo /monaural 0: Stereo
11
TEMP1 R 1
FIFO state
10
WLVL1 0 0: Low left 1: High left
9
EDGE1 R/W 0
8
CLKE1 0
Transmission WS level
Data output Clock clock edge operation 0: Falling 1: Rising (after transmission) 0: Enable 1: Disable
0: Data
1: Monaural 1: No data
I2S1 Divider Value Setting Register 7
I2S1C bit Symbol Reset State Function CK17 0 (181AH) Read/Write 0 0 0
6
CK16
5
CK15
4
CK14
3
CK13 R/W 0
2
CK12 0
1
CK11 0
0
CK10 0
Divider value for CK signal (8-bit counter)
15
Bit symbol (181BH) Read/Write Reset State Function
14
13
WS15 0
12
WS14 0
11
WS13 R/W 0
10
WS12 0
9
WS11 0
8
WS10 0
Divider value for WS signal (6-bit counter)
I2S1 Buffer Register 15
I2S1BUF (1810H) bit Symbol Read/Write Reset State Function A readmodifywrite operation bit Symbol Read/Write cannot be Reset State performed Function
B115
14
B114
13
B113
12
B112
11
B111
10
B110
9
B109
8
B108
7
B107
6
B106
5
B105
4
B104
3
B103
2
B102
1
B101
0
B100
W Undefined Transmission buffer register (FIFO)
31
B131
30
B130
29
B129
28
B128
27
B127
26
B126
25
B125
24
B124
23
B123
22
B122
21
B121
20
B120
19
B119
18
B118
17
B117
16
B116
W Undefined Transmission buffer register (FIFO)
Figure 3.18.3 I2S Channel 1 Control Registers
92CF26A-505
2007-11-21
TMP92CF26A
(a) This bit controls to connect source clock to I2S circuit. In case of this circuit is operated, it must enable: = "1". And except operating, for reduce the power consumption, we recommends to disable: = "0". (b) This bit controls data format: I2S, right justify and left justify. It is not possible to change data format during data transmission. Before changing the data format, set = "1", ="0" and = "0". (c) This bit controls data length: 8/16 bits. It is not possible to change data length during data transmission. Before changing the data format, set = "1", = "0" and = "0". (d) This bit controls direction: LSB_Fast or MSB_Fast It is not possible to change data direction during data transmission. Before changing the data format, set = "1", ="0" and ="0". (e) This bit controls clock generator counter: Clear/Start. Clock generator counter will clear by ="0" and ="0", However, Clock generator counter will not clear by ="0" and ="1" (f) This bit controls data transmission and Fi/Fo buffer clear: Trans/Stop and Clear Transmission is stopped by ="0", started by ="1". Output Fi/Fo buffer is cleared by ="0". (g) This bit controls CLK out period. ="0": always out I2SnCKO clock, ="1": I2SnCKO clock out during effective data out period.
Note: In case of I S format, firstly I2SnWS signal change and after 1clock period, effective data out. If set to = "1" with I S format, 1 clock pulse after I2SnWS don't out. It is not possible ="0" setting with I S format.
2 2 2
(h) This bit controls relation of phase between I2SnCKO and data. ="0": data is latched the falling edge of clock. ="1": data is latched the rising edge of clock. It is not possible to change phase during data transmission. Before changing the data format, set ="1", ="0" and ="0".
92CF26A-506
2007-11-21
TMP92CF26A
(i) This bit controls phase of Word Select signal: I2SnWS I2SnWS signal always out "1" level first. The order of data output changes by . Refer the "Fi/Fo buffer and data format" in details. It is not possible to change phase of Word Select signal during data transmission. Before changing the data format, set = "1", = "0" and ="0". (j) This bit is empty flag of output Fi/Fo buffer. ="1": Fi/Fo buffer is empty, ="0": remain data in Fi/Fo buffer. This bit is read only. Fi/Fo buffer is cleared by ="0" (k) This bit controls sound mode: Stereo / Monaural ="0": Stereo, ="1": Monaural. Refer the chapter of "Data format" in details. It is not possible to change sound mode during data transmission. Before changing the data format, set ="1", ="0" and ="0". (l) This bit controls source clock to I2S circuit: fSYS / fPLL. ="0": fSYS is supplied, ="1": fPLL is supplied. In case of using fPLL, before set fPLL clock, please take care set -up time: Lock-Up time. In details, refer the chapter of PLL, please. (m) These bits are set counter value of clock generator. [I2SnCK] It is not possible to change these counter value during data transmission. Before changing the counter value, set ="1", ="0" and ="0". (n) These bits are set counter value of clock generator. [I2SnWS] It is not possible to change these counter value during data transmission. Before changing the counter value, set ="1", ="0" and ="0".
92CF26A-507
2007-11-21
TMP92CF26A 3.18.3 Description of Operation
(1) Settings the transfer clock generator and Word Select signal In the I2S unit, the clock frequencies for the I2SnCKO and I2SnWS signals are generated using the system clock (fSYS) as a source clock. The system clock is divided by a prescaler and a dedicated clock generator to set the transfer clock and sampling frequency. The counters are started by setting I2SnCTL to "1" and are stopped and cleared by setting to "0". A) Clock generator * 8-bit counter This is an 8-bit counter that generates the I2SnCKO signal by dividing the clock selected by I2SnCTL. * 6-bit counter This is a 6-bit counter that generates the I2SnWS signal by dividing the I2SnCKO signal. B) Word Select * Word Select signal (I2SnWS) The I2SnWS signal is used to distinguish the position of valid data and whether left data or right data is being transmitted in the I2S format. This signal is clocked out in synchronization with the data transfer clock. In only channel 0, this signal can be used as an AD conversion trigger signal for the ADC. How valid data is to be output in relation to the WS signal can be specified as I2S format, left-justified, or right-justified. In only channel 0, an interrupt request can be output to the ADC on the rising edge of the WS signal. (This is controlled by the ADC's control register.) (2) Data format This circuit support I2S format, left justify and right justify format by setting I2SnCTL register. And support stereo and monaural both, controlled by I2SnCTL register.
92CF26A-508
2007-11-21
TMP92CF26A
Right Data
Left Data
I2SnWS I2SnCKO
I2S format I2SnDO Stereo
LSB
MSB
LSB
MSB
LSB
MSB
Valid data Monaural LSB MSB LSB
Valid Data MSB
Valid Data Left justify I2SnDO Stereo MSB LSB MSB LSB MSB
Valid Data Monaural MSB LSB
Valid Data MSB
Valid Data Right justify I2SnDO Stereo LSB MSB LSB MSB LSB
Valid Data Monaural LSB MSB LSB
Valid Data
Valid Data
Figure3.18.4 Output Format
92CF26A-509
2007-11-21
TMP92CF26A
(3) Setting example for the clock generator (8-bit counter/6-bit counter) The clock generator generates the reference clock for setting the data transfer speed and sampling frequency. 7
I2S0C (180AH) bit Symbol Read/Write Reset State Function 0 0 0 0 CK07
6
CK06
5
CK05
4
CK04 R/W
3
CK03 0
2
CK02 0
1
CK01 0
0
CK00 0
Divider value for CK signal (8-bit counter)
15
Bit symbol (180BH) Read/Write Reset State Function
14
13
WS05 0
12
WS04 0
11
WS03 R/W 0
10
WS02 0
9
WS01 0
8
WS00 0
Divider value for WS signal (6-bit counter)
*
Setting the transfer clock I2SnCKO
The transfer clock is generated by dividing the clock selected by I2SnCTL . An 8-bit counter is provided to divide the source clock by 3 to 256. (The divider value cannot be set to 1 or 2.)
Note: The transfer clock must not exceed 10 MHz. Make sure that the transfer clock is set to within 10 MHz by an appropriate combination of source clock frequency and divider value.
8-bit counter set value 00000000 00000001 11111111
Divider value 256 1 255
When fSYS = 60 MHz and I2SnC = 150, the data transfer speed is set as follows: I2SnCKO = fSYS/150 = 60 [MHz]/150 = 400 [kbps]
Note: It is recommended that the value to be set in I2SnC be an even number. Although it is possible to set an odd number, the clock duty of the CK signal does not become 50%. Setting an odd number causes the High width of the I2SnCK0 signal to become longer by one fSYS or fPLL pulse than the Low width. (When = 0, the Low width becomes longer than the High width.)
92CF26A-510
2007-11-21
TMP92CF26A
* Setting the sampling frequency WS
The sampling frequency is set by dividing the transfer clock (CK) described above. A 6-bit counter is provided to divide the transfer clock by 16 to 64. (The divider value cannot be set to 1 to 15.) 6-bit counter set value 000000 000001 111111 Divider value 64 1 63
When fSYS = 60 MHz, I2SnC = 150, and I2SnC = 50, the sampling frequency is set as follows: I2SnCKO = fSYS / 150 / 50 = 60 [MHz] / 150 / 50 = 8 [kHz] Based on the above, the transfer clock is set to 400 kbps, and the sampling frequency is set to 8 kHz in this example.
Note 1: The value to be set in I2SnC must be 16 or larger (18 or larger for I S transfer) when the data length is 8 bits and 32 or larger (34 or larger for I S transfer) when the data length is 16 bits. Note 2: It is recommended that the value to be set in I2SnC be an even number. Although it is possible to set an odd number, the clock duty of the WS signal does not become 50%. Setting an odd number causes the High width of the WS signal to become longer by one I2SnCK0 pulse than the Low width.
2 2
*
Special function
As a special function available only in channel 0, the rising edge of the WS signal can be used as an AD conversion start trigger for the AD converter in this LSI. Setting I2S0CTL=1 and I2S0CTL=1 enables the WS signal to be sent to the AD converter. This can be done regardless of the setting of I2S0CTL. For details about AD conversion using the WS signal, refer to the chapter on the AD converter.
92CF26A-511
2007-11-21
TMP92CF26A
(4) FIFO buffer and data format The I2S unit is provided with a 128-byte FIFO buffer (32-bit wide x 32-entry). The data written to the 4 bytes (32 bits) of the I2SnBUF register is written to this FIFO buffer. This FIFO must be written in units of 4 bytes. It is also necessary to consider the output order and to distinguish between right data and left data. To write data to the I2SnBUF register, be sure to use a 4-byte load instruction. If a 1-byte load instruction is used, invalid data will be transmitted. In case of using 1-byte or 2-byte transmission instruction, FIFO buffer isn't renewed and transmission isn't started. And window addresses are 1800H (channel 0) and 1810H (channel1). Write Data Size
1-byte access 2-byte access 4-byte access
Example instruction
ld (0x1800),a ld (0x1800),wa ld (0x1800),xwa
8-bit width
Not allowed Not allowed OK
16-bit width
Not allowed Not allowed OK
Also note that data must be written in units of 64 bytes using the following sequence: 4-byte load instruction x 16 times = 64-byte data write If data is not written in units of 64 bytes, interrupts cannot be generated at the normal timing. The I2SnCTL flag is set to "1" when the FIFO buffer for each channel contains no valid data. If there is even one byte of valid data in the FIFO, the flag is cleared to "0". (The flag is set to "1" as soon as the last valid data in the FIFO is sent to the transmission shift register.)
92CF26A-512
2007-11-21
TMP92CF26A
The following shows how written data is output under various conditions. When I2SnCTL = 0
I2SnBUF register Output order 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
MSB-first 16 bits LSB-first 16 bits MSB-first 8 bits LSB-first 8 bits
2'nd Data 2'nd Data 4'th Data 4'th Data 15 14 13 12 11 10 9 8 7 6 5 4 3 2 3'rd Data 3'rd Data 1 0
MSB-first 16 bits LSB-first 16 bits MSB-first 8 bits LSB-first 8 bits
1'st Data 1'st Data 2'nd Data 2'nd Data 1'st Data 1'st Data
When I2SnCTL = 1
I2SnBUF register Output order 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
MSB-first 16 bits LSB-first 16 bits MSB-first 8 bits LSB-first 8 bits
1'st Data 1'st Data 3'rd Data 3'rd Data 15 14 13 12 11 10 9 8 7 6 5 4 3 2 4'th Data 4'th Data 1 0
MSB-first 16 bits LSB-first 16 bits MSB-first 8 bits LSB-first 8 bits
2'nd Data 2'nd Data 1'st Data 1'st Data 2'nd Data 2'nd Data
Note: In case of using monaural setting, and change right / left: I2SnCTL, data output order change off 1'st data and 2'nd data.
92CF26A-513
2007-11-21
TMP92CF26A 3.18.4 Detailed Description of Operation
(1) Connection example Figure3.18.5 shows an example of connections between the TMP92CF26A and an external LSI (DA converter) using channel 0.
TMP92CF26A (Transmit) PF2/I2S0WS PF0/I2SCKO PF1/I2SDO (Receive) WS CK DATA
Example: DA converter Note: After reset, PF0 to PF2 are placed in a high-impedance state. Connect each pin with a pull-up or pull-down resistor as necessary.
Figure3.18.5 Connection Example between the TMP92CF26A and an External LSI (2) Operation procedure The I2S unit incorporates a 128-byte FIFO buffer that is divided into two 64-byte units. Whenever each 64-byte buffer space becomes empty, an INTI2Sn interrupt is generated. The next data to be transmitted should be written to the FIFO in the interrupt routine. Example settings and timing diagram are shown below.
(Example settings) I2S0WS = 8 KHz, I2SnCKO = 400 kHz, data transmission on the rising edge (at fSYS = 50 MHz) (Main routine) 7 INTEI2S01 PFCR PFFC I2S0C I2S0CTL I2S0BUF X X - 1 X 0 0 * * * * I2S0CTL 1 0 6 - X X 0 X 0 X * * * * 1 X 5 - - - 0 1 X X * * * * X X 4 - - - 1 1 0 X * * * * 0 0 3 X - - 0 0 1 X * * * * 1 X 2 0 - 1 1 0 0 0 * * * * 0 0 1 0 - 1 1 1 0 0 * * * * 0 0 0 1 - 1 0 0 1 0 * * * * 1 0 Start transmission. Set interrupt level. Set pins: PF0 (I2S0CKO), PF1 (I2S0DO), PF2 (I2S0WS) Divider value N=150 Divider value K=50 Set transmit mode (I2S mode, MSB-first, 16-bit). Falling edge, WS=0 Left, clock stop. Write left and right data to FIFO (4 bytes x 32 = 128 bytes).
(INTI2S Interrupt Routine) I2S0BUF * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Write left and right data to FIFO (4 bytes x 16 = 64 bytes).
X: Don't care, -: No change
92CF26A-514
2007-11-21
TMP92CF26A
FIFO write 1 I2SnWS pin I2SnCKO pin I2SnDO pin 2 3 4 31 32 33
INTI2Sn Overall Timing Diagram I2SnWS pin I2SnCKO pin I2SnDO pin LSB MSB Bit15 Bit14 LSB Bit0 MSB Bit15 Bit14 Detailed Timing Diagram LSB Bit0 MSB Bit15
400kHz
Figure3.18.6 Timing Diagrams (I2S FMT/Stereo/16bit/MSB first)
92CF26A-515
2007-11-21
TMP92CF26A
(3) Considerations for using the I2S unit 1) INTI2Sn generation timing Every 4bytes data trance from FIFO buffer to shift register per one time. An INTI2Sn interrupt is generated under two conditions. One is when there are 64 bytes of empty space in the FIFO (after 61- 64th byte has been transferred to the shift register). The other is when the FIFO becomes completely empty (after 125-128th byte has been transferred to the shift register). Therefore, INTI2Sn indicates that there are 64 bytes or 128 bytes of empty space in the FIFO, enabling the next data to be written. The FIFO must be written in units of 64 bytes. Since the FIFO can contain 128 bytes of data, I2S output can be performed continuously as long as there are 64 bytes of data in the FIFO. It is also possible to check the FIFO state by using the I2SnCTL flag. 2) I2SnCTL Transmission is started by setting I2SnCTL to "1". Once is set to "1", transmission is continued automatically as long as the FIFO contains the data to be transmitted. While is set to "1" (transmission in progress), the other bits in the I2SnCTL register must not be changed. To stop transmission, make sure that the FIFO is empty by checking the I2SnCTL flag. Then, after waiting for two periods of the I2SWS signal (after all the data has been transmitted), set to "0". In case monaural setting, make sure that the FIFO is empty by checking the I2SnCTL flag. Then, after waiting for four periods of the I2SWS signal (after all the data has been transmitted), set to "0". If is set to "0" while data is being transmitted, the transmission is stopped immediately. At the same time, the read and write pointers of the FIFO, the data in the output shift register and the clock generator are all cleared. (However, when I2SnCTL=1, the clock generator is not cleared. To clear the clock generator, I2SnCTL must be set to "0"). Therefore, if transmission is stopped and then resumed, no data will be output. The WS signal stops at Low level and the CK signal stops at Low level when the rising edge is selected and at High level when the falling edge is selected. 3) I2SnCTL I2SnCTL is used to control the clock generator (8-bit counter, 6-bit counter) for generating the I2SnCKO and I2SnWSOsignals. Setting I2SnCTL to "1" starts the counters, and setting this bit to "0" stops the counters. Normally, I2S data transmission is executed by setting both I2SnCTL and to "1". When transmission is stopped by setting I2SnCTL to "0" with I2SnCTL=1, the clock generator is not cleared. To clear the clock generator, I2SnCTL must be set to "0".
92CF26A-516
2007-11-21
TMP92CF26A
4) FIFO buffer The I2S unit is provided with a 128-byte FIFO. Although it is not necessary to use all 128 bytes in the FIFO, data should basically be written in units of 64 bytes using an INTI2Sn interrupt as a trigger. If data is written to the FIFO without waiting for an INTI2Sn interrupt or in units other than 64 bytes, interrupts cannot be generated properly. If the last set of data, for which an interrupt is not needed, contains less than 64 bytes, set I2SnCTL to "0" to stop the transmission after writing the data, then checking that the flag is set to "1", and waiting for two I2SWS periods (i.e., after all the data has been transmitted). In case monaural setting, make sure that the FIFO is empty by checking the I2SnCTL flag. Then, after waiting for four periods of the I2SWS signal (after all the data has been transmitted), set to "0". 5) I2SnBUF When writing data to the I2SnBUF register, be sure to use long-word data load instructions. Word data load or byte data load instructions cannot be used. Examples) ld ld ld (I2SnBUF), xwa; OK (I2SnBUF), wa; (I2SnBUF), a; NG NG
6) Share with HALT instruction I2S circuit is not operated at IDLE1/STOP modes. Therefore, maybe PLL clock that operate at IDLE1 mode affects to this circuits. If mode is shifted to HALT mode, set it after I2S circuit is stopped. When the CPU is shifted to the HALT mode after transmission is stopped, the time to stop completely is necessary before execution of HALT instruction. It's time is NOPx10. Example: ld NOPx10 HALT (I2SCTL), 0x00 ; Stop transmission
92CF26A-517
2007-11-21
TMP92CF26A
3.19 LCD Controller (LCDC)
The TMP92CF26A incorporates an LCD controller (LCDC) for controlling an LCD driver LSI (LCD module). This LCDC supports monochrome, grayscale, from 256-color to 16777216-color and display sizes from 64 x 64 to 640 x 480 dots. The supported LCD driver (LCD module) types are STN (Super Twisted Nematic) and digital RGB input TFT (Thin Film Transistor). * STN support
With LCD drivers supporting STN, an 8-bit data interface is used to realize monochrome, 4-graysale, 16-grayscale, 64-grayscale, 256-color, 4096-color, 65536-color display. After required settings such as the operation mode, display RAM start address, and LCD size (common, segment) are made in the I/O registers, the start register is set to enable the LCDC. The LCDC outputs a bus request to the CPU, reads data from the display RAM, converts the data as necessary, and writes it to a dedicated FIFO buffer. * TFT support
With LCD drivers supporting digital RGB input TFT, an 8- to 24-bit data interface is used to realize 4096-color, 65536-color, 262144-color, and 16777216-color display. The data transfer method is the same as in the case of STN. The LCDC controls LCD display operations using 8-bit RGB (R3:G3:B2), 12-bit RGB (R4:G4:B4), 16-bit RGB (R5:G6:B5), 18-bit RGB (R6:G6:B6), or 24-bit RGB (R8:G8:B8) display data, the shift clock LCP0 for capturing data, the frame signal LFR, the data load signal LLOAD, and the LDIV signal for indicating the inversion of data output. The LDIV signal can be used effectively in reducing noise and power consumption. The LCDC also has horizontal synchronization signal LHSYNC and vertical synchronization signal LVSYNC for controlling gate drivers, and three programmable OE pins for supporting various signals of the TFT driver to be used.
92CF26A-518
2007-11-21
TMP92CF26A 3.19.1 LCDC Features according to LCD Driver Type
Table 3.19.1 LCDC Features according to LCD Driver Type (This table assumes the connection with a TOSHIBA-made LCD driver.) LCD Driver
Display colors
Shift Register Type TFT
256/4096/65536/262144/16777216 colors For 4096 colors or less Rows (Commons): 64, 96, 128, 160, 200, 240, 320, 480 Columns (Segments): 64, 128, 160, 240, 320, 480, 640 For 65536 colors or less Rows (Commons): 64, 96, 128, 160, 200, 240, 320, 480 Columns (Segments): 64, 128, 160, 240, 320, 480 16777216 colors or less ROW(common): 64,96,128,160,200,240,320,480 - Column (Segment): 64,128,160,240,320 Horizontal flip, vertical flip, horizontal and vertical flip, 90-degree rotation (supported for QVGA size, 65536 colors only) A sub window can be inserted. 16 bits (32 bits: internal RAM) 8 to 24 bits 1-clk / 4byte at internal RAM To be connected to LCD driver data bus. 8-bit mode: LD7 to LD0 TFT mode: LD23 to LD0 Data shift clock for TFT source driver
STN
Monochrome, 4/16/64 grayscale levels 256/4096/65536 colors For Monochrome/grayscale/4096 colors or less Rows (Commons): 64, 96, 120, 128, 160, 200, 240, 320, 480 Columns (Segments): 64, 120, 128, 160, 240, 320, 480, 640 For 65536 colors or less Rows (Commons): 64, 96, 128, 160, 200, 240, 320, 480 Columns (Segments): 64, 128, 160, 240, 320
Number of pixels that can be displayed
Data rotation function PIP function support Source data bus width (SRAM, SDRAM) Destination data bus width (LCD driver) Maximum transfer rate (VRAM read) LCD driver data bus: LD23 to LD0 pins LCP0 pin
16 bits (32 bits: internal RAM) 8 bits
Vertical shift clock for TFT gate driver External Pins LHSYNC pin Enable signal for TFT source driver to load data to TFT panel Adjustment signal for TFT gate driver's gate control signal LCD alternate signal output pin. To be connected to column/row driver's FR pin. This signal indicates the start of shift clock capture by TFT gate driver. This signal indicates the inversion of data. To be connected to TFT source driver having the data inversion function.
Shift clock pulse output pin 0. To be connected to column driver's CP pin. The LCD driver latches the data bus value on the falling edge of this pin. Latch pulse output pin. To be connected to the LCD driver's LP pin. The display data in the LCD driver's output line register is updated on the rising edge of this pin. N/A N/A LCD alternate signal output pin. To be connected to column/row driver's FR pin. Frequency that sets LCD refresh rate N/A
LLOAD pin LGOE0 to LGOE2 pins LFR pin LVSYNC pin LDIV pin
92CF26A-519
2007-11-21
TMP92CF26A 3.19.2 SFRs
LCDMODE0 Register 7
LCDMODE0 (0280H) bit Symbol Read/Write Reset State Function 0 Display RAM 00: Internal RAM 01: External SRAM 10: SDRAM 11: Reserved SCPW2= 1 00: 6-clk 01: 12-clk 10: 24-clk 11: 48-clk Note: When SDRAM is used as the LCDC's display RAM, it can only be accessed by "burst 1-clock access". 0 1 SCPW2= 0 00: 2-clk 01: 4-clk 10: 8-clk 11: 16-clk 1 LD bus transfer speed
6
5
SCPW1
4
SCPW0 R/W
3
MODE3 0 Mode selection
0000: Reserved 0001: SR (mono) 0010: SR (4-gray) 0011: Reserved 0100: SR (16-gray) 0101: SR (64-gray)
2
MODE2 0
1
MODE1 0
0
MODE0 0
RAMTYPE1 RAMTYPE0
1000: STN (64K-color) 1001: Reserved 1010: TFT (256-color) 1011: TFT (4096-color) 1100: TFT (64K-color) 1101:TFT(256K-,16M-color) 1110 : Reserved
0110: STN (256-color)
0111:STN (4096-color) 1111: Reserved
LCDMODE1 Register 7
LCDMODE1 (0281H) bit Symbol Read/Write Reset State Function 0 0 0 Data rotation function
(Supported for 64K-color: 16bps only)
6
LDC1
5
LDC0 R/W
4
LDINV 0 LD bus inversion 0: Normal 1: Invert
3
AUTOINV 0 Auto bus inversion 0: Disable 1: Enable (Valid only for TFT)
2
INTMODE 0 Interrupt selection 0:LLOAD 1:LVSYNC
1
FREDGE W 0 LFR edge
0: LHSYNC Front Edge EAR Edge
0
SCPW2 0 LD bus Trance Speed 0: normal
LDC2
000: Normal 010: Vertical flip 111: Reserved
100: 90-degree 110: Reserved
001: Horizontal flip 101: Reserved 011: Horizontal & vertical flip
1:LHSYNCR 1: 1/3
Note: =1 inverts all output data on the LD bus. However, the LDIV signal that indicates the inversion of output data by auto bus inversion remains unchanged.
LCD Size Setting Register 7
LCDSIZE (0284H) bit Symbol Read/Write Reset State Function 0 Common setting 0000: Reserved 0001: 64 0010: 96 0011: 120 0100: 128 0101: 160 0110: 200 0111: 240 1000: 320 1001: 480 1010: Reserved 1011: Reserved 1100: Reserved 1101: Reserved 1110: Reserved 1111: Reserved 0 0 0 COM3
6
COM2
5
COM1
4
COM0 R/W
3
SEG3 0 Segment setting 0000: Reserved 0001: 64 0010: 128 0011: 160 0100: 240 0101: 320 0110: 480 0111: 640
2
SEG2 0
1
SEG1 0 1000: Reserved 1001: Reserved 1010: Reserved 1011: Reserved 1100: Reserved 1101: Reserved 1110: Reserved 1111: Reserved
0
SEG0 0
Note: Although the TMP92CF26A contains 144 Kbytes of RAM that can be used as display RAM, it may not be enough depending on display size and color mode.
92CF26A-520
2007-11-21
TMP92CF26A
LCD Control 0 Register 7
LCDCTL0 (0285H) bit Symbol Read/Write Reset State Function PIP function 0:Disable 1:Enable 0 data 0: Normal 1: Always output "0" PIPE
6
ALL0 R/W 0 Segment
5
FRMON 0 Frame divide setting 0: Disable 1: Enable
4
- R/W 0 Always write "0"
3
2
DLS 0 FR signal LCP0/Line selection 0:Line 1:LCP0
1
LCP0OC R/W 0 LCP0 (Note)
0: Always output 1: At valid data only LLOAD width 0: At setting in register 1: At valid data only
0
START 0 LCDC operation 0: Stop 1: Start
Note: When select STN mode, LCP0 is output at valid data only regardless of the setting of bit.
LCD Control 1 Register 7
LCDCTL1 (0286H) bit Symbol Read/Write Reset State Function 1 LCP0 phase 0: Rising 1: Falling 0 LHSYNC phase 0: Rising 1: Falling LCP0P
6
LHSP R/W
5
LVSP 1 LVSYNC phase 0: Rising 1: Falling
4
LLDP 0 LLOAD phase 0: Rising 1: Falling
3
2
1
LVSW1 R/W 0
LVSYNC
0
LVSW0 0
enable time control 00: 1 clock of LHSYNC 01: 2 clocks of LHSYNC 10: 3 clocks of LHSYNC 11: Reserved
LCD Control 2 Register 7
LCDCTL2 (0287H) bit Symbol Read/Write Reset State Function 0 LGOE2 phase 0: Rising 1: Falling LGOE2P
6
LGOE1P R/W 0 LGOE1 phase 0: Rising 1: Falling
5
LGOE0P 0 LGOE0 phase 0: Rising 1: Falling
4
3
2
1
0
Divide FRM 0 Register 7
LCDDVM0 (0283H) bit Symbol Read/Write Reset State Function 0 0 0 0 LCP0 DVM (bits 3-0) FMP3
6
FMP2
5
FMP1
4
FMP0 R/W
3
FML3 0
2
FML2 0
1
FML1 0
0
FML0 0
LHSYNC DVM (bits 3-0)
Divide FRM 1 Register 7
LCDDVM1 (0288H) bit Symbol Read/Write Reset State Function 0 0 0 0 LCP0 DVM (bits 7-4) FMP7
6
FMP6
5
FMP5
4
FMP4 R/W
3
FML7 0
2
FML6 0
1
FML5 0
0
FML4 0
LHSYNC DVM (bit 7-4)
92CF26A-521
2007-11-21
TMP92CF26A
LCD LHSYNC Pulse Register 7
LCDHSP (028AH) bit Symbol Read/Write Reset State Function 0 0 0 0 LH7
6
LH6
5
LH5
4
LH4 W
3
LH3 0
2
LH2 0
1
LH1 0
0
LH0 0
LHSYNC period (bits 7-0)
7
(028BH) bit Symbol Read/Write Reset State Function 0 LH15
6
LH14 0
5
LH13 0
4
LH12 W 0
3
LH11 0
2
LH10 0
1
LH9 0
0
LH8 0
LHSYNC period (bits 15-8)
LCD LVSYNC Pulse Register 7
LCDVSP (028CH) bit Symbol Read/Write Reset State Function 0 0 0 0 LVP7
6
LVP6
5
LVP5
4
LVP4 W
3
LVP3 0
2
LVP2 0
1
LVP1 0
0
LVP0 0
LVSYNC period (bits 7-0)
7
(028DH) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
LVP9 W 0 (bits 9-8)
0
LVP8 0
LVSYNC period
LCD LVSYNC Pre Pulse Register 7
LCDPRVSP bit Symbol (028EH) Read/Write Reset State Function 0 0 0
6
PLV6
5
PLV5
4
PLV4
3
PLV3 W 0
2
PLV2 0
1
PLV1 0
0
PLV0 0
Front dummy LVSYNC (bits 6-0)
92CF26A-522
2007-11-21
TMP92CF26A
LHSYNC Delay Register 7
LCDHSDLY bit Symbol (028FH) Read/Write Reset State Function 0 0 0
6
HSD6
5
HSD5
4
HSD4
3
HSD3 W 0
2
HSD2 0
1
HSD1 0
0
HSD0 0
LHSYNC delay (bits 6-0)
LLOAD Delay Register 7
LCDLDDLY bit Symbol (0290H) Read/Write Reset State Function PDT R/W 0
Data output timing 0: Sync with LLOAD 1: 1 clock later than LLOAD
6
LDD6 0
5
LDD5 0
4
LDD4 0
3
LDD3 W 0 LLOAD delay (bits 6-0)
2
LDD2 0
1
LDD1 0
0
LDD0 0
LGOE0 Delay Register 7
LCDO0DLY (0291H) bit Symbol Read/Write Reset State Function 0 0 0
6
OE0D6
5
OE0D5
4
OE0D4
3
OE0D3 W 0 OE0 delay (bits 6-0)
2
OE0D2 0
1
OE0D1 0
0
OE0D0 0
LGOE1 Delay Register 7
LCDO1DLY bit Symbol (0292H) Read/Write Reset State Function 0 0 0
6
OE1D6
5
OE1D5
4
OE1D4
3
OE1D3 W 0 OE1 delay (bits 6-0)
2
OE1D2 0
1
OE1D1 0
0
OE1D0 0
LGOE2 Delay Register 7
LCDO2DLY bit Symbol (0293H) Read/Write Reset State Function 0 0 0
6
OE2D6
5
OE2D5
4
OE2D4
3
OE2D3 W 0 OE2 delay (bits 6-0)
2
OE2D2 0
1
OE2D1 0
0
OE2D0 0
92CF26A-523
2007-11-21
TMP92CF26A
LHSYNC width Register 7
LCDHSW (0294H) bit Symbol Read/Write Reset State Function 0 0 0 0 HSW7
6
HSW6
5
HSW5
4
HSW4 W
3
HSW3 0
2
HSW2 0
1
HSW1 0
0
HSW0 0
LHSYNC width (bits 7-0)
LLOAD width Register 7
LCDLDW (0295H) bit Symbol Read/Write Reset State Function 0 0 0 0 LDW7
6
LDW6
5
LDW5
4
LDW4 W
3
LDW3 0
2
LDW2 0
1
LDW1 0
0
LDW0 0
LLOAD width (bits 7-0)
LGOE0 width Register 7
LCDHO0W bit Symbol (0296H) Read/Write Reset State Function 0 0 0 0 O0W7
6
O0W6
5
O0W5
4
O0W4 W
3
O0W3 0
2
O0W2 0
1
O0W1 0
0
O0W0 0
LGOE0 width (bits 7-0)
LGOE1 width Register 7
LCDHO1W bit Symbol (0297H) Read/Write Reset State Function 0 0 0 0 O1W7
6
O1W6
5
O1W5
4
O1W4 W
3
O1W3 0
2
O1W2 0
1
O1W1 0
0
O1W0 0
LGOE1 width (bits 7-0)
LGOE2 width Register 7
LCDHO2W (0298H) bit Symbol Read/Write Reset State Function 0 0 0 0 O2W7
6
O2W6
5
O2W5
4
O2W4 W
3
O2W3 0
2
O2W2 0
1
O2W1 0
0
O2W0 0
LGOE2 width (bits 7-0)
signal width Bit8,9 Register 7
LCDHWB8 bit Symbol (0299H) Read/Write Reset State Function 0 0 0 0 LGOE2 width (bits 9-8) LGOE1 width (bits 9-8) O2W9
6
O2W8
5
O1W9
4
O1W8 W
3
O0W8 0
LGOE0 width (bit 8)
2
LDW9 0
1
LDW8 0
0
HSW8 0
LHSYNC width (bit 8)
LLOAD width (bits 9-8)
92CF26A-524
2007-11-21
TMP92CF26A
LCD Main Area Start Address Register 7
LSAML bit Symbol Reset State Function LMSA7 0 (02A0H) Read/Write 0 0
6
LMSA6
5
LMSA5
4
LMSA4 R/W 0
3
LMSA3 0
2
LMSA2 0
1
LMSA1 0
0
LCD main area start address (A7-A1)
7
LSAMM bit Symbol Reset State Function LMSA15 0 (02A1H) Read/Write
6
LMSA14 0
5
LMSA13 0
4
LMSA12 R/W 0
3
LMSA11 0
2
LMSA10 0
1
LMSA9 0
0
LMSA8 0
LCD main area start address (A15-A8)
7
LSAMH bit Symbol Reset State Function LMSA23 0 (02A2H) Read/Write
6
LMSA22 1
5
LMSA21 0
4
LMSA20 R/W 0
3
LMSA19 0
2
LMSA18 0
1
LMSA17 0
0
LMSA16 0
LCD main area start address (A23-A16)
Note: When assigned internal RAM as VRAM, A1 signal cannot be used. Every 4bytes setting is needed.
LCD Sub Area Start Address Register 7
LSASL (02A4H) bit Symbol Read/Write Reset State Function 0 0 0 LSSA7
6
LSSA6
5
LSSA5
4
LSSA4 R/W 0
3
LSSA3 0
2
LSSA2 0
1
LSSA1 0
0
LCD sub area start address (A7-A1)
7
LSASM (02A5H) bit Symbol Read/Write Reset State Function 0 LSSA15
6
LSSA14 0
5
LSSA13 0
4
LSSA12 R/W 0
3
LSSA11 0
2
LSSA10 0
1
LSSA9 0
0
LSSA8 0
LCD sub area start address (A15-A8)
7
LSASH (02A6H) bit Symbol Read/Write Reset State Function 0 LSSA23
6
LSSA22 1
5
LSSA21 0
4
LSSA20 R/W 0
3
LSSA19 0
2
LSSA18 0
1
LSSA17 0
0
LSSA16 0
LCD sub area start address (A23-A16)
Note: When assigned internal RAM as VRAM, A1 signal cannot be used. Every 4bytes setting is needed.
LCD Sub Area HOT Point Register (X-dir) 7
LSAHX (02A8H) bit Symbol Read/Write Reset State Function 0 0 0 0 SAHX7
6
SAHX6
5
SAHX5
4
SAHX4 R/W
3
SAHX3 0
2
SAHX2 0
1
SAHX1 0
0
SAHX0 0
LCD sub area HOT point (7-0)
7
(02A9H) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
SAHX9 R/W 0 point (9-8)
0
SAHX8 0
LCD sub area HOT
92CF26A-525
2007-11-21
TMP92CF26A
LCD Sub Area HOT Point Register (Y-dir) 7
LSAHY (02AAH) bit Symbol Read/Write Reset State Function 0 0 0 0 SAHY7
6
SAHY6
5
SAHY5
4
SAHY4 R/W
3
SAHY3 0
2
SAHY2 0
1
SAHY1 0
0
SAHY0 0
LCD sub area HOT point (7-0)
7
(02ABH) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
0
SAHY8 R/W 0 LCD sub area HOT point (8)
LCD Sub Area Display Segment Size Register 7
LSASS (02ACH) bit Symbol Read/Write Reset State Function 0 0 0 0 SAS7
6
SAS6
5
SAS5
4
SAS4 R/W
3
SAS3 0
2
SAS2 0
1
SAS1 0
0
SAS0 0
LCD sub area segment size (7-0)
7
(02ADH) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
SAS9 R/W 0 size (9-8)
0
SAS8 0
LCD sub area segment
LCD Sub Area Display Common Size Register 7
LSACS (02AEH) bit Symbol Read/Write Reset State Function 0 0 0 0 SAC7
6
SAC6
5
SAC5
4
SAC4 R/W
3
SAC3 0
2
SAC2 0
1
SAC1 0
0
SAC0 0
LCD sub area common size (7-0)
7
(02AFH) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
0
SAC8 R/W 0
LCD sub area common size (8)
92CF26A-526
2007-11-21
TMP92CF26A 3.19.3 Description of Operation
After the required settings such as the operation mode, display data memory address, color mode, and LCD size are specified, the start register is set to start the LCDC operation. The LCDC issues a bus request to the CPU. When the bus is granted, the LCDC reads data of the display size from the display RAM, stores the data in the FIFO buffer in the LCDC, and then returns the bus to the CPU. The display data in the FIFO buffer is transferred to the LCD driver via a dedicated bus (LD pin). At this time, control pins (such as LCP0) that are connected to the LCD driver also output specified waveforms in synchronization with the transfer of display data.
Note: While display RAM data is being read, the CPU operation is halted by the internal BUSREQ signal. Therefore, the CPU stop time must be taken into account in programming.
3.19.3.1 Outline
External SDRAM, SRAM, or internal RAM (144 Kbytes) can be used as the display RAM. Since the internal RAM allows very fast accesses (32-bit bus, 2-1-1-1 read/write), it enables data transfer to the LCD driver (DMA operation) with the minimum CPU stop time. Using the internal RAM also greatly reduces power consumption during LCD display.
3.19.3.2 Display Memory Mapping Since the number of bits needed to display one pixel varies even for the same display size depending on the selected color mode, the required display RAM size also varies with each color mode. (The color mode can be selected from a range of monochrome to 16777216 colors.) In monochrome mode, one pixel of display data corresponds to one bit of display RAM data. Likewise, the number of display RAM data used for displaying one pixel in each color mode is as follows: 4-grayscale 1 pixel = 2 bits 16-grayscale1 pixel = 4 bits 64-grayscale STN 256-color STN 4096-color STN 65536-color TFT 256K-color TFT 16M-color 1 pixel = 6 bits 1 pixel = 8 bits 1 pixel = 12 bits 1 pixel = 16 bits 1 pixel = 16 bits (not 18 bits) 1 pixel = 24 bits
For example, a 320-segment x 240-common display in 4-grayscale mode requires 19200 bytes of display RAM space (320 x 240 x 2 = 152600 bits = 19200 bytes). For details, refer to "Memory Map Image and Data Output in Each Display Mode" later in this chapter.
92CF26A-527
2007-11-21
TMP92CF26A
3.19.3.3 Restriction of Display Memory This LCD controller is supported for display RAM as internal RAM, external SRAM and external SDRAM. However in case of using SDRAM for display RAM, there is one restriction as follows. Condition & Restrictions a) Use for SDRAM as VRAM of LCD controller and b) Use DMAC operation In case of above condition, Need to set SDACR= "1". Please refer the chapter of SDRAM controller about SDRAM specification in detail.
92CF26A-528
2007-11-21
TMP92CF26A
3.19.3.4 Basic Operation The following diagram shows the basic timings of the waveforms generated by the LCDC and adjustable elements. The adjustable elements for each signal include enable time, phase, and delay time. The signals used and their connections and settings vary with the LCD driver type (STN/TFT) and specifications to be used.
Signal Name
Frame period (Refresh rate)
LVSYNC signal (Enable width control) (Phase control) (Enable width control) (Phase control)
(Enable width control) LHSYNC signal LLOAD signal LGOEn signal (Enable width control) (Phase control) (Delay control) (Phase control)
(Delay control)
LFR signal (FREDGE=0) (Frame divide control) (Line) (Dot)
(Line divide) (Dot divide)
LFR signal (FREDGE=1) (Line divide) DLS=0 (Line inversion) (Dot divide)
LLOAD signal
LLOAD signal details (Valid data output) LCP0 signal (Only at valid data output) (Always output) (Phase control)
LD23-LD0 signal LDINV signal
92CF26A-529
2007-11-21
TMP92CF26A
3.19.3.5 Reference Clock LCP0 LCP0 is used as the reference clock for all the signals in the LCDC. This section explains how to set the frequency (period) of the LCP0 signal. The LCP0 clock speed (LD bus transfer speed) is determined by selecting TFT or STN and setting LCDMODE0 and LCDMODE1. The clock speed should be selected to meet the characteristics of the LCD driver to be used. The LCP0 period can be selected from four types: fSYS/2, fSYS/4, fSYS/8, fSYS/16, fSYS/24 and fSYS/48.
Internal signal (fSYS) LCP0 fSYS/2 LD23-LD0 LCP0 fSYS/4 LD23-LD0
LCP0 LD23-LD0
fSYS/48
Figure 3.19.1 LCP Frequency Selection Minimum speed The LCP0 period needs to be short enough to prevent the next line signal from overlapping the current line signal. The transfer speed of display data must be set to suit the refresh rate; otherwise data cannot be transferred properly. Set the data transfer speed so that each transfer completes within the LHSYNC period.
STN monochrome/grayscale STN color TFT : : : Segment size / 8 x LCP0 [s: period] < LHSYNC [s: period] STN color Segment size x 3 / 8 LCP0 [s: period] < LHSYNC [s: period] Segment size x LCP0 [s: period] < LHSYNC [s: period]
Maximum speed If the LCP0 period is too short, the data to be transferred to the LCD driver cannot be prepared in time, causing wrong data to be transferred. The maximum transfer speed is limited by the operation mode and display RAM type (bus width, wait condition, and so on). If the data rotation function is used, the transfer speed must be slower.
92CF26A-530
2007-11-21
TMP92CF26A
LCP0 Setting Range Table
Conditions : fSYS = 60MHz Display size Display size : : (color) (monochrome/grayscale) up to 320 x 320 up to 640 x 480
Note: This table shows the range of LCP0 settings that can be made under the conditions shown above. If the CPU clock speed, display size, or refresh rate is changed, the LCP0 range also changes.
Display RAM Internal RAM Display Mode
STN monochrome Refresh cycle = 70 Hz STN 4-grayscale Refresh cycle = 70 Hz STN 16-grayscale Refresh cycle = 140 Hz STN 64-grayscale Refresh cycle = 200 Hz STN 256-color Refresh cycle = 70 Hz STN 4K-color Refresh cycle = 70 Hz STN 64K-color Refresh cycle = 70 Hz STN 64K-color Refresh Cycle = 70 Hz + rotation operation TFT 4K-color Refresh cycle = 70 Hz TFT 64K-color Refresh cycle = 70 Hz TFT 64K-color + rotation operation TFT 256K-color Refresh cycle = 70 Hz TFT 16M-color Refresh cycle = 70 Hz fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/8 fSYS/4 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/8 fSYS/4 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/4 to fSYS/16 fSYS/4 to fSYS/16 fSYS/2 To fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16
SDRAM
External SRAM (0 waits)
fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/4 to fSYS/8 fSYS/4 fSYS/4 to fSYS/16 fSYS/4 to fSYS/16 fSYS/8 to fSYS/16 fSYS/8 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/2 to fSYS/16 fSYS/4 to fSYS/16 fSYS/2 to fSYS/16
External SRAM (N waits)
fSYS/4 tofSYS/16 (up to 2 waits) fSYS/8 to fSYS/16 (up to 6 waits) fSYS/16 (up to 14 waits) fSYS/4 to fSYS/8 (up to 2 waits) fSYS/8 (up to 6 waits) fSYS/8 to fSYS/16 (up to 2 waits) fSYS/16 (up to 6 waits) fSYS/4 (up to 1 wait) fSYS/8 to fSYS/16 (up to 2 waits) fSYS/16 (up to 6 waits) fSYS/4 to fSYS/16 (up to 2 waits) fSYS/8 to fSYS/16 (up to 6 waits) fSYS/16 (up to 14 waits) fSYS/16 (up to 3 waits) fSYS/16 (up to 3 waits) fSYS/4 to fSYS/16 (up to 2 waits) fSYS/8 to fSYS/16 (up to 6 waits) fSYS/16 (up to 14 waits) fSYS/4 to fSYS/16 (up to 2 waits) fSYS/8 to fSYS/16 (up to 6 waits) fSYS/16 (up to 14 waits) fSYS/4 to fSYS/16 (up to 2 waits) fSYS/8 to fSYS/16 (up to 6 waits) fSYS/16 (up to 14 waits) fSYS/8 to fSYS/16 (up to 2 waits) fSYS/16 (up to 2 waits) fSYS/4 to fSYS/16 (up to 2 waits) fSYS/8 to fSYS/16 (up to 2 waits) fSYS/16 (up to 2 waits)
92CF26A-531
2007-11-21
TMP92CF26A
Example 1: When fSYS = 10 MHz, STN mode, LCDMODE0 = 01 Internal reference clock LCP0 = fSYS / 8 = 10 MHz / 8 = 1.25 [MHz] LCP0 period = 1 / 1.25 [MHz] = 0.8 [S] Example 2: when fSYS = 60 MHz, TFT mode, LCDMODE0 = 11 Internal reference clock LCP0 = fSYS / 16 = 60 MHz / 16 = 3.75 [MHz] LCP0 period = 1 / 3.75 [MHz] = 266 [nS]
LCDMODE0 Register 7
LCDMODE0 (0280H) bit Symbol Read/Write Reset State Function 0 Display RAM 00: Internal RAM(32-bit) 01: External SRAM 10: SDRAM 11: Reserved SCPW2= 1 00: 6-clk 01: 12-clk 10: 24-clk 11: 48-clk 0 1 SCPW2= 0 00: 2-clk 01: 4-clk 10: 8-clk 11: 16-clk 1 LD bus transfer speed
RAMTYPE1
6
RAMTYPE0
5
SCPW1
4
SCPW0 R/W
3
MODE3 0 Mode selection
0000: Reserved 0001: SR (mono) 0010: SR (4-gray) 0011: Reserved 0100: SR (16-gray) 0101: SR (64-gray)
2
MODE2 0
1
MODE1 0
0
MODE0 0
1000: STN (64K-color) 1001: Reserved 1010: TFT (256-color) 1011: TFT (4096-color) 1100: TFT (64K-color) 1101:TFT(256K-,16M-color) 1110 : Reserved 1111: Reserved
0110: STN (256-color) 0111:STN (4096-color)
92CF26A-532
2007-11-21
TMP92CF26A
LCDCTL0 is used to control the output timing of the LCP0 signal. When =0, the LCP0 signal is always output. When =1, the LCP0 signal is output only when valid data is output.
LCP0 signal LCP0OC=1 LCP0 signal LCP0OC=0
LCD Control 0 Register 7
LCDCTL0 (0285H) bit Symbol Read/Write Reset State Function 0 0:Disable 1:Enable data 0: Normal 1: Always output "0" PIPE
6
ALL0 R/W 0
5
FRMON 0 Frame divide setting 0: Disable 1: Enable
4
- R/W 0 Always write "0"
3
2
DLS 0
FR signal LCP0/Line selection 0:Line 1:LCP0
1
LCP0OC R/W 0
LCP0(Note 0: Always output 1: At valid data only LLOAD width 0: At setting in register 1: At valid data only
0
START 0
LCDC operation 0: Stop 1: Start
PIP function Segment
Note: When select STN mode, LCP0 is output at valid data only regardless of the setting of bit.
The phase of the LCP0 signal can be inverted by the setting of LCDCTL1.
LVSYNC LHSYNC LLOAD LGOEn LFR All signal changes LCP0P=0 LCP0P=1 LCP0 LCP0 LD23-LD0
LCD Control 1 Register 7
LCDCTL1 (0286H) bit Symbol Read/Write Reset State Function 1 LCP0 phase 0: Rising 1: Falling 0 LHSYNC phase 0: Rising 1: Falling LCP0P
6
LHSP R/W
5
LVSP 1 LVSYNC phase 0: Rising 1: Falling
4
LLDP 0 LLOAD phase 0: Rising 1: Falling
3
2
1
LVSW1 R/W 0
LVSYNC
0
LVSW0 0
enable time control 00: 1 clock of LHSYNC 01: 2 clocks of LHSYNC 10: 3 clocks of LHSYNC 11: Reserved
92CF26A-533
2007-11-21
TMP92CF26A
3.19.3.6 Refresh Rate The period of the horizontal synchronization signal LHSYNC is defined as the product of the value set in LCDHSP and the LCP0 clock period. The value to be set in LCDHSP is obtained as follows: TFT Segment size + number of dummy clocks (*) STN Monochrome/grayscale Color : (Segment size / 8) + number of dummy clocks (*) : (Segment size x 3 / 8) + number of dummy clocks (*)
LHSYNC [s: period] = LCP0 [s: period] x ( + 1) LCD LHSYNC Pulse Register 7
LCDHSP (028AH) bit Symbol Read/Write Reset State Function 0 0 0 0 LH7
6
LH6
5
LH5
4
LH4 W
3
LH3 0
2
LH2 0
1
LH1 0
0
LH0 0
LHSYNC period (bits 7-0)
7
(028BH) bit Symbol Read/Write Reset State Function 0 LH15
6
LH14 0
5
LH13 0
4
LH12 W 0
3
LH11 0
2
LH10 0
1
LH9 0
0
LH8 0
LHSYNC period (bits 15-8)
92CF26A-534
2007-11-21
TMP92CF26A
The period of the vertical synchronization signal LVSYNC is defined as the product of the value set in LCDVSP and the LHSYNC period. The value to be set in LCDVSP is obtained as follows: TFT Common size + number of dummy clocks (*) STN Common size + number of dummy clocks (*) (A minimum of one dummy clock must be inserted in the back porch.) LVSYNC [s: period] = LHSYNC [s: period] x ( + 1) = LCP0 [s: period] x ( + 1) x ( + 1) LCD LVSYNC Pulse Register 7
LCDVSP (028CH) bit Symbol Read/Write Reset State Function 0 0 0 0 LVP7
6
LVP6
5
LVP5
4
LVP4 W
3
LVP3 0
2
LVP2 0
1
LVP1 0
0
LVP0 0
LVSYNC period (bits 7-0)
7
(028DH) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
LVP9 W 0 (bits 9-8)
0
LVP8 0
LVSYNC period
92CF26A-535
2007-11-21
TMP92CF26A
* Insertion of dummy clocks
Reference LHSYNC (Delay=0) LVSYNC LHSYNC (with delay) LCP0 LD23-0
Note: At least two LCP0 pulses must be inserted.
Vertical Front Porch
Horizontal Front Porch
Horizontal back Porch
Vertical back Porch
The above is a conceptual diagram showing the data (LD23-0), shift clock (LCP0), horizontal synchronization signal (LHSYNC), and vertical synchronization signal (LVSYNC) on the LCD panel. The front porch and back porch as shown above should be taken into consideration in setting LCDHSP and LCDVSP explained earlier.
Note 1: The horizontal back porch must be set so that "data transfer" plus "LCP0 x 2 clocks" are completed within one period of the reference clock LHSYNC (with 0 delay), as defined by the following equation: Delay time (LLOAD) + number of data transfer times + 2 < LHSYNC (LCP0 pulse count) Note 2: The vertical back porch must have a minimum of one dummy clock.
(*) TFT driver The recommended number of dummy clocks is specified by each TFT driver (or LCD module). Refer to the specifications of the TFT driver (LCD module) to be used. (*) STN driver For an STN driver, the refresh rate can be set accurately by adjusting the value of the horizontal back porch. If the desired refresh rate cannot be obtained by the horizontal back porch, it can be further adjusted by the vertical back porch. For details, refer to the setting example to be described later in this section.
92CF26A-536
2007-11-21
TMP92CF26A
* Setting method The front dummy LHSYNC (vertical front porch) not accompanied by valid data in the total of LHSYNC period in the LVSYNC period is defined by the value set in LCDPRVSP. Front dummy LHSYNC (vertical front porch) = The back dummy LHSYNC (vertical back porch) is defined as follows: (+1) - (valid LHSYNC: common size) - (front dummy LHSYNC: ) The vertical back porch must have a minimum of one dummy clock. The front dummy LCP0 (horizontal front porch) not accompanied by valid data in the total number of LCP0 clocks in the LHSYNC period is defined by the value set in LCDLDDLY. Front dummy LCP0 (horizontal front porch) = The back dummy LCP0 (horizontal back porch) is defined as follows: ( + 1) - (Valid LCP0: segment size) - (Front dummy LCP0: )
Note 1: The back dummy LCP0 (horizontal back porch) must have a minimum of two LCP0 clocks. Note 2: The delay time that is set in LCDLDDLY is counted based on LHSYNC (with 0 delay).
LLOAD Delay Register 7
LCDLDDLY bit Symbol (0290H) Read/Write Reset State Function PDT R/W 0
Data output timing 0: Sync with LLOAD 1: 1 clock later than LLOAD
6
LDD6 0
5
LDD5 0
4
LDD4 0
3
LDD3 W 0 LLOAD delay (bits 6-0)
2
LDD2 0
1
LDD1 0
0
LDD0 0
Example 1) Setting the refresh rate to 200 Hz under the following conditions: fSYS = 30 MHz, STN mode, 320-segment x 240-common, 4096-color display, LCDMODE0 = 00 Internal reference clock LCP0 = fSYS / 4 = 30 [MHz] / 4 = 7.5 [MHz] Therefore, LCP0 period = 1 / 7.5 [MHz] = 0.133 [S] Condition 1: Condition 2: Condition 3: Refresh rate = 200 Hz, Refresh cycle = 5 [ms] LH = (320x3/8) - 1 = 119 LV = 240 - 1
When = 239 (minimum value): LVSYNC [S: period] = = 5 [mS] LH + 1 = = = LHSYNC [S: period] x ((LV9:0) + 1 ) LCP0 [S: period] x ((LH15:0 ) + 1 ) x ((LV9:0) + 1 ) ( 1 / 7.5 [MHz]) x ( LH + 1) x 240 -3 6 ( 5 x 10 ) x ( 7.5 x 10 ) / 240 156.25
92CF26A-537
2007-11-21
TMP92CF26A
3.19.3.7 Signal Settings
Signal Name LCP0 signal
LVSYNC signal
Front dummy LHSYNC (Vertical front porch)
Valid LHSYNC (Common size)
Back dummy LHSYNC (Vertical back porch)
LHSYNC signal LGOEn signal
FR signal
LLOAD signal
LLOAD signal LCP0 signal LD23-LD0 signal LDINV signal
The above diagram shows the typical timings of the signals controlled by the LCDC. This section explains how to control each of these signals.
92CF26A-538
2007-11-21
TMP92CF26A
(1) LVSYNC Signal The period of the vertical synchronization signal LVSYNC indicates the time for each screen update (refresh rate). The LVSYNC period is defined as an integral multiple of the period of the horizontal synchronization signal LHSYNC. The LVSYNC period is calculated as the product of the value set in LCDVSP and the LHSYNC period. The value to be set in LCDVSP should be "common size + number of dummy clocks" or larger for TFT and STN. LVSYNC [s: period] = LHSYNC [s: period] x ( + 1) = LCP0 [s: period] x ( + 1) x ( + 1) LCD LVSYNC Pulse Register 7
LCDVSP (028CH) bit Symbol Read/Write Reset State Function 0 0 0 0 LVP7
6
LVP6
5
LVP5
4
LVP4 W
3
LVP3 0
2
LVP2 0
1
LVP1 0
0
LVP0 0
LVSYNC period (bits 7-0)
7
(028DH) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
LVP9 W 0 (bits 9-8)
0
LVP8 0
LVSYNC period
The enable width of the LVSYNC signal can be specified as 1 clock, 2 clocks, or 3 clocks of LHSYNC in LCDCTL1. The phase of the LVSYNC signal can be inverted by the setting of LCDCTL1 .
Refresh rate (Enable width control) LVSP=0 (Phase control) LVSP=1 LVSYNC signal
LCD Control 1 Register 7
LCDCTL1 (0286H) bit Symbol Read/Write Reset State Function 1 LCP0 phase 0: Rising 1: Falling 0 LHSYNC phase 0: Rising 1: Falling LCP0P
6
LHSP R/W
5
LVSP 1 LVSYNC phase 0: Rising 1: Falling
4
LLDP 0 LLOAD phase 0: Rising 1: Falling
3
2
1
LVSW1 R/W 0
LVSYNC
0
LVSW0 0
enable time control 00: 1 clock of LHSYNC 01: 2 clocks of LHSYNC 10: 3 clocks of LHSYNC 11: Reserved
92CF26A-539
2007-11-21
TMP92CF26A
(2) LHSYNC Signal The period of the horizontal synchronization signal LHSYNC corresponds to one line of display. The LHSYNC period is defined as an integral multiple of the reference clock signal LCP0. The LHSYNC period is defined as the product of the value set in LCDHSP and the LCP0 clock period. The value to be set in LCDHSP should be "segment size + number of dummy clocks" or larger for TFT. In the case of STN, the minimum value of LCDHSP is: Monochrome/grayscale Color : (Segment size / 8) + number of dummy clocks : (Segment size x 3 / 8) + number of dummy clocks
LHSYNC [s: period] = LCP0 [s: period] x ( + 1) LCD LHSYNC Pulse Register 7
LCDHSP (028AH) bit Symbol Read/Write Reset State Function 0 0 0 0 LH7
6
LH6
5
LH5
4
LH4 W
3
LH3 0
2
LH2 0
1
LH1 0
0
LH0 0
LHSYNC period (bits 7-0)
7
(028BH) bit Symbol Read/Write Reset State Function 0 LH15
6
LH14 0
5
LH13 0
4
LH12 W 0
3
LH11 0
2
LH10 0
1
LH9 0
0
LH8 0
LHSYNC period (bits 15-8)
The enable width of the LHSYNC signal can be specified by LCDHSW. It is also possible to set the delay time for the LVSYNC signal in units of LCP0 pulses.
LHSYNC signal (Enable width control)
(Phase control)
(Delay control)
92CF26A-540
2007-11-21
TMP92CF26A
The enable width of the LHSYNC signal is set using LCDHSW. It can be specified in a range of 1 to 512 pulses of the LCP0 clock. The enable width is represented by the following equation: Enable width = + 1 Thus, when LCDHSW is set to "0", the enable width is set as one pulse of the LCP0 clock.
Signal Name LCP0
LHSYNC signal
High width setting LCP0 clock = 1, 2, 3 ... 512 pulses
LHSYNC width Register 7
LCDHSW (0294H) bit Symbol Read/Write Reset State Function 0 0 0 0 HSW7
6
HSW6
5
HSW5
4
HSW4 W
3
HSW3 0
2
HSW2 0
1
HSW1 0
0
HSW0 0
LHSYNC width (bits 7-0)
Signal width Bit8,9 Register 7
LCDHWB8 bit Symbol (0299H) Read/Write Reset State Function 0 0 0 0 LGOE2 width (bits 9-8) LGOE1 width (bits 9-8) O2W9
6
O2W8
5
O1W9
4
O1W8 W
3
O0W8 0
LGOE0 width (bit 8)
2
LDW9 0
1
LDW8 0
0
HSW8 0
LHSYNC width (bit 8)
LLOAD width (bits 9-8)
92CF26A-541
2007-11-21
TMP92CF26A
As shown in the diagram below, delay time of 0 to 127 pulses of the LCP0 clock can be inserted in the LHSYNC signal. Delay time =
Signal Name LCP0 signal
LVSYNC signal
Reference LHSYNC (with 0 delay) LHSYNC signal Delay control 1
LHSYNC Delay Register 7
LCDHSDLY bit Symbol (028FH) Read/Write Reset State Function 0 0 0
6
HSD6
5
HSD5
4
HSD4
3
HSD3 W 0
2
HSD2 0
1
HSD1 0
0
HSD0 0
LHSYNC delay (bits 6-0)
The phase of the LHSYNC signal can be inverted by the setting of LCDCTL1 .
LHSYNC period LHSYNC signal (Enable width control) LHSP=0 (Phase control) LHSP=1
LCD Control 1 Register 7
LCDCTL1 (0286H) bit Symbol Read/Write Reset State Function 1 LCP0 phase 0: Rising 1: Falling 0 LHSYNC phase 0: Rising 1: Falling LCP0P
6
LHSP R/W
5
LVSP 1 LVSYNC phase 0: Rising 1: Falling
4
LLDP 0 LLOAD phase 0: Rising 1: Falling
3
2
1
LVSW1 R/W 0
LVSYNC
0
LVSW0 0
enable time control 00: 1 clock of LHSYNC 01: 2 clocks of LHSYNC 10: 3 clocks of LHSYNC 11: Reserved
92CF26A-542
2007-11-21
TMP92CF26A
(3) LLOAD Signal The LLOAD signal is used to control the timing for the LCD driver to receive display data. The period of the LLOAD signal synchronizes to one line of display. It is defined as an integral multiple of the reference clock LCP0.
Refresh rate Front dummy LHSYNC (Vertical front porch) LVSYNC signal LLOAD: Common size (Valid data) Back dummy LHSYNC (Vertical back porch)
LHSYNC signal
LLOAD signal
LD23-LD0 signal LLOAD signal LLOAD signal LCDLDDLY = 1 LCP0 signal LD23-LD0 signal LDINV signal
The LHSYNC signal and LLOAD signal differs in that the LHSYNC signal is output all the time whereas the LLOAD signal is output only at valid data lines (commons). Display data is output in synchronization with the LLOAD signal. Therefore, if a delay is inserted in the LLOAD signal through the LCDLDDLY register, data output is also delayed. Also note that when LCDLDDLY=1, data is output one LCP0 clock later than the LLOAD signal. LCDLDDLY=0: Data is output in synchronization with the LLOAD signal. LCDLDDLY=1: Data is output one LCP0 clock later than the LLOAD signal. The delay time for the LLOAD signal is controlled based on LCDLDDLY=1. Therefore, even if the delay time is set to "0" with LCDLDDLY=0, the LLOAD signal is output with a delay of one LCP0 clock. Be careful about this point.
92CF26A-543
2007-11-21
TMP92CF26A
The number of pulses in the front dummy LHSYNC (vertical front porch) is specified by LCDPRVSP. This delay time can be set in a range of 0 to 127 pulses of the LCP0 clock. Front dummy LHSYNC = LCD LVSYNC Pre Pulse Register 7
LCDPRVSP bit Symbol (028EH) Read/Write Reset State Function 0 0 0
6
PLV6
5
PLV5
4
PLV4
3
PLV3 W 0
2
PLV2 0
1
PLV1 0
0
PLV0 0
Front dummy LVSYNC (bits 6-0)
The back dummy LHSYNC (vertical back porch) is defined as follows: ( + 1) - (valid LHSYNC: common size) - (front dummy LHSYNC: )
Signal Name LCP0
LLOAD signal
High width setting LCP0 clock = 1, 2, 3 ... 1023 pulses (=0) / 1024 pulses (=1) Note: The vertical back porch must be set to "1" or longer in all the cases (STN/TFT).
The enable width of the LLOAD signal LCDCTL0 setting, as shown below. LCDCTL0 = 0 LCDCTL0 = 1
is
determined
depending
on
the
: Output at setting value in (LCDDLW) : Output at valid data
LCD Control 0 Register 7
LCDCTL0 (0285H) bit Symbol Read/Write Reset State Function PIP function 0:Disable 1:Enable 0 data 0: Normal 1: Always output "0" PIPE
6
ALL0 R/W 0 Segment
5
FRMON 0 Frame divide setting 0: Disable 1: Enable
4
- R/W 0 Always write "0"
3
2
DLS 0
FR signal LCP0/Line selection 0:Line 1:LCP0
1
LCP0OC R/W 0
LCP0(Note 0: Always output 1: At valid data only LLOAD width 0: At setting in register 1: At valid data only
0
START 0
LCDC operation 0: Stop 1: Start
Note: When select STN mode, LCP0 is output at valid data only regardless of the setting of bit.
92CF26A-544
2007-11-21
TMP92CF26A
The enable width of the LLOAD signal is specified using LCDLDW. It can be set in a range of 0 to 1024 pulses of the LCP0 clock. The actual enable width is determined depending on the LCDLDDLY setting, as shown below. Enable width = + 1 Enable width = (when = 1, =0 is prohibited) (when = 0)
LLOAD width Register 7
LCDLDW (0295H) bit Symbol Read/Write Reset State Function 0 0 0 0 LDW7
6
LDW6
5
LDW5
4
LDW4 W
3
LDW3 0
2
LDW2 0
1
LDW1 0
0
LDW0 0
LLOAD width (bits 7-0)
Signal width Bit8,9 Register 7
LCDHWB8 bit Symbol (0299H) Read/Write Reset State Function 0 0 0 0 LGOE2 width (bits 9-8) LGOE1 width (bits 9-8) O2W9
6
O2W8
5
O1W9
4
O1W8 W
3
O0W8 0
LGOE0 width (bit 8)
2
LDW9 0
1
LDW8 0
0
HSW8 0
LHSYNC width (bit 8)
LLOAD width (bits 9-8)
When LCDCTL0=1, the enable width of the LLOAD signal is shown below.
LLOAD LLOAD
LCP0 LD23-LD0
LCDLDDLY = 0 LCDLDDLY = 1
92CF26A-545
2007-11-21
TMP92CF26A
As shown in the diagram below, delay time of 0 to 127 pulses of the LCP0 clock can be inserted in the LLOAD signal. Delay time =
Signal Name LCP0 signal
LLVSYNC signal
LHSYNC signal (Internal reference signal) LLOAD signal Delay control
Note: The delay time for the LLOAD signal is controlled based on LCDLDDLY=1. Therefore, even if the delay time is set to"0" with LCDLDDLY=0, the LLOAD signal is output with a delay of one LCP0 clock. Be careful about this point.
LLOAD Delay Register 7
LCDLDDLY bit Symbol (0290H) Read/Write Reset State Function PDT R/W 0
Data output timing 0: Sync with LLOAD 1: 1 clock later than LLOAD
6
LDD6 0
5
LDD5 0
4
LDD4 0
3
LDD3 W 0 LLOAD delay (bits 6-0)
2
LDD2 0
1
LDD1 0
0
LDD0 0
The phase of the LLOAD signal can be inverted by the setting of LCDCTL1 .
LLOAD period (Enable width control) LLDP=0 (Phase control) LLDP=1 LLOAD signal
LCD Control 1 Register 7
LCDCTL1 (0286H) bit Symbol Read/Write Reset State Function 1 LCP0 phase 0: Rising 1: Falling 0 LHSYNC phase 0: Rising 1: Falling LCP0P
6
LHSP R/W
5
LVSP 1 LVSYNC phase 0: Rising 1: Falling
4
LLDP 0 LLOAD phase 0: Rising 1: Falling
3
2
1
LVSW1 R/W 0
0
LVSW0 0
LVSYNC enable time control 00: 1 clock of LHSYNC 01: 2 clocks of LHSYNC 10: 3 clocks of LHSYNC 11: Reserved
92CF26A-546
2007-11-21
TMP92CF26A
(4) LGOE0 to LGOE2 Signals The LCDC has three signals (LGOE0 to LGOE2) that can be controlled like the LHSYNC signal. For these signals, the enable width, delay time, and phase timing can be adjusted as shown below.
Signal Name LCP0
LGOE0 signal LGOE1 signal LGOE2 signal High width setting LGOE0: LCP0 clock = 1, 2, 3 ... 512 pulses LGOE1: LCP0 clock = 1, 2, 3 ... 1024 pulses LGOE2: LCP0 clock = 1, 2, 3 ... 1024 pulses
LGOE0 width Register 7
LCDHO0W bit Symbol (0296H) Read/Write Reset State Function 0 0 0 0 O0W7
6
O0W6
5
O0W5
4
O0W4 W
3
O0W3 0
2
O0W2 0
1
O0W1 0
0
O0W0 0
LGOE0 width (bits 7-0)
LGOE1 width Register 7
LCDHO1W bit Symbol (0297H) Read/Write Reset State Function 0 0 0 0 O1W7
6
O1W6
5
O1W5
4
O1W4 W
3
O1W3 0
2
O1W2 0
1
O1W1 0
0
O1W0 0
LGOE1 width (bits 7-0)
LGOE2 width Register 7
LCDHO2W (0298H) bit Symbol Read/Write Reset State Function 0 0 0 0 O2W7
6
O2W6
5
O2W5
4
O2W4 W
3
O2W3 0
2
O2W2 0
1
O2W1 0
0
O2W0 0
LGOE2 width (bits 7-0)
Signal width Bit8,9 Register 7
LCDHWB8 bit Symbol (0299H) Read/Write Reset State Function 0 0 0 0 LGOE2 width (bits 9-8) LGOE1 width (bits 9-8) O2W9
6
O2W8
5
O1W9
4
O1W8 W
3
O0W8 0
LGOE0 width (bit 8)
2
LDW9 0
1
LDW8 0
0
HSW8 0
LHSYNC width (bit 8)
LLOAD width (bits 9-8)
92CF26A-547
2007-11-21
TMP92CF26A
Signal Name LCP0 signal
LVSYNC signal
LHSYNC signal (Internal reference signal) LGOE0 signal Delay control
LGOE0 Delay Register 7
LCDO0DLY (0291H) bit Symbol Read/Write Reset State Function 0 0 0
6
OE0D6
5
OE0D5
4
OE0D4
3
OE0D3 W 0 OE0 delay (bits 6-0)
2
OE0D2 0
1
OE0D1 0
0
OE0D0 0
LGOE1 Delay Register 7
LCDO1DLY bit Symbol (0292H) Read/Write Reset State Function 0 0 0
6
OE1D6
5
OE1D5
4
OE1D4
3
OE1D3 W 0 OE1 delay (bits 6-0)
2
OE1D2 0
1
OE1D1 0
0
OE1D0 0
LGOE2 Delay Register 7
LCDO2DLY bit Symbol (0293H) Read/Write Reset State Function 0 0 0
6
OE2D6
5
OE2D5
4
OE2D4
3
OE2D3 W 0 OE2 delay (bits 6-0)
2
OE2D2 0
1
OE2D1 0
0
OE2D0 0
92CF26A-548
2007-11-21
TMP92CF26A
LGOEn signal LGOEnP=0 (Phase control) LGOEnP=1
LCD Control 2 Register 7
LCDCTL2 (0287H) bit Symbol Read/Write Reset State Function 0 LGOE2 phase 0: Rising 1: Falling LGOE2P
6
LGOE1P R/W 0 LGOE1 phase 0: Rising 1: Falling
5
LGOE0P 0 LGOE0 phase 0: Rising 1: Falling
4
3
2
1
0
92CF26A-549
2007-11-21
TMP92CF26A
(5) LFR Signal The LFR (frame) signal is used to control the direction of bias the LCD driver applies on liquid crystal cells. With small screens in monochrome mode, the polarity of the LFR signal is normally inverted in synchronization with each screen display. With large screens or when grayscale or color mode is used, the polarity is inverted at shorter intervals to adjust the display quality. When LCDCTL0="1" and LCDCTL0 = "0", the LFR signal is inverted at intervals of "LHSYNC x N" (LHSYNC: internal reference signal with 0 delays). The "N" value is specified in LCDDVM0 and LCDDVM1. When = "0" and = "0", LFR signal synchronous with front edge of LHSYNC signal, and when ="0" and =1, LFR signal synchronous with rear edge of LHSYNC signal. When LCDCTL0 is set to "0" to disable the frame divide function, the LFR signal is inverted in synchronization with the LVSYNC period. Enabling this function does not affect the waveform and timing of the LVSYNC signal. (The refresh rate is not changed.)
Note1: The effect of this function varies with the characteristics of the LCD driver and LCD panel to be used. Note2: LFR signal delaies synchronous with LHSYNC signal. Generally, setting a prime number (3, 5, 7, 11, 13 and so on) as the "N" value produces better results.
LVSYNC
LFR =0 = 0 N LHSYNC LFR =0 = 1 = N = any = 0 LFR =1 = 0 N
LFR =1 = 1 = N = any = 0
92CF26A-550
2007-11-21
TMP92CF26A
When LCDCTL0= "1" and LCDCTL0= "1", frame output is inverted at intervals set in LCDDVM0 and the LFR signal is inverted at intervals of "LCP0 x M". The "M" value is specified in LCDDVM0. When = "1" LFR signal synchronous with front edge of LHSYNC signal. So, prohibit to set = "1", always need to set = "0".
LVSYNC
N LHSYNC
LHSYNC (Expansion) M LCP0 LFR =0 = 1 = N = M = 1 M
Note: prohibit to set =1, always need to set =0.
92CF26A-551
2007-11-21
TMP92CF26A
LCD Control 0 Register 7
LCDCTL0 (0285H) bit Symbol Read/Write Reset State Function PIP function 0:Disable 1:Enable 0 data 0: Normal 1: Always output "0" PIPE
6
ALL0 R/W 0 Segment
5
FRMON 0 Frame divide setting 0: Disable 1: Enable
4
- R/W 0 Always write "0"
3
2
DLS 0
FR signal LCP0/Line selection 0:Line 1:LCP0
1
LCP0OC R/W 0
LCP0(Note 0: Always output 1: At valid data only LLOAD width 0: At setting in register 1: At valid data only
0
START 0
LCDC operation 0: Stop 1: Start
Note: When select STN mode, LCP0 is output at valid data only regardless of the setting of bit.
Divide FRM 0 Register 7
LCDDVM0 (0283H) bit Symbol Read/Write Reset State Function 0 0 0 0 LCP0 DVM (bits 3-0) FMP3
6
FMP2
5
FMP1
4
FMP0 R/W
3
FML3 0
2
FML2 0
1
FML1 0
0
FML0 0
LHSYNC DVM (bits 3-0)
Divide FRM 1 Register 7
LCDDVM1 (0284H) bit Symbol Read/Write Reset State Function 0 0 0 0 LCP0 DVM (bits 7-4) FMP7
6
FMP6
5
FMP5
4
FMP4 R/W
3
FML7 0
2
FML6 0
1
FML5 0
0
FML4 0
LHSYNC DVM (bit 7-4)
92CF26A-552
2007-11-21
TMP92CF26A
(6) LD Bus The data to be transferred to the LCD driver is output via a dedicated bus (LD23 to LD0). The output format can be selected according to the input method of the LCD driver to be used. The LCDC reads data of the size corresponding to the specified LCD size from the display RAM and transfers it to the external LCD driver via the data bus pin dedicated to the LCD. Thus, the LCDC automatically issues a bus request to the CPU (to stop CPU operation) when it needs to read data from the display RAM. The bus occupancy rate of the LCDC varies depending on the display mode and the speed at which data is read from the display RAM. Valid Data Read Time tLRD(ns/bytes) at fSYS = 60 MHz
16.6 **4.16 *8.33
Display RAM
External SRAM Internal RAM External SDRAM
Bus Width
16-bit 32-bit 16-bit
Valid Data Read Time (fSYS clocks/bytes)
(2 + number of waits) / 2 **1/4 *1/2
Note: When SDRAM is used, additional 9 clocks are needed as overhead time for reading each common (line) data. When internal RAM is used, additional 1 clock is needed as overhead time for reading each common (line) data. Additional 1 clock of overhead time is also needed when a change of blocks occur in the internal RAM even if the common (line) remains the same.
The time the CPU stops operating while data for one common (line) is being transferred is defined as tSTOP, which is represented by the following equation: tSTOP = (SegNum x K / 8) x tLRD SegNum K : Number of display segments K=1 K=2 K=4 K=8 K=12 K=16 K=24
: Number of bits needed for displaying one pixel Monochrome display 4-grayscale display 16-grayscale display 256-color display 4096-color display 65536-color display 262144-/16777216-color display
Note: When SDRAM is used, overhead time is added as follows: tSTOP [S] = (SegNum x K / 8) x tLRD + ((1 / fSYS) x 8) The bus occupancy rate indicates the proportion of the one common (line) update time tLP occupied by tSTOP and is calculated by the following equation: CPU bus occupancy rate = tSTOP [s] / LHSYNC [s: period]
92CF26A-553
2007-11-21
TMP92CF26A
* Memory Map Image and Data Output in Each Display Mode
STN monochrome (1-pixel display data = 1-bit memory data) Display Memory
Address 0 LSB D0 0 1 23 456 7 Address 1 Address 2 Address 3 MSB D31 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
LD Bus Output 8-bit type LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 0 1 2 3 4 5 6 7 8... 9... 10 ... 11 ... 12 ... 13 ... 14 ... 15 ...
Note: When setting 240 segment, 256 segment size of data is required.
STN 4-grayscale (1-pixel display data = 2-bit memory data) Display Memory
Address 0 LSB D0 0 1 23 456 7 Address 1 Address 2 Address 3 MSB D31 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
LD Bus Output 8-bit type LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 1-0 3-2 5-4 7- 6 9- 8 11-10 13-12 15-14 17-16 ... 19-18 ... 21-20 ... 23-22 ... 25-24 ... 27-26 ... 29-28 ... 31-30 ...
Figure 3.19.2 Memory Map Image and Data Output in STN Monochrome/4-Grayscale Mode
92CF26A-554
2007-11-21
TMP92CF26A
STN 16-grayscale (1-pixel display data = 4-bit memory data) Display Memory
Address 0 LSB D0 0 1 23 456 7
Address 1
Address 2
Address 3 MSB D31
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Address 4 LSB D0
Address 5
Address 6
Address 7 MSB D31
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
LD Bus Output 8-bit type LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 3-0 7-4 11-8 15-12 19-16 23-20 27-24 31-28 35-32 ... 39-36 ... 43-40 ... 47-44 ... 51-48 ... 55-52 ... 59-56... 63-60 ...
Figure 3.19.3 Memory Map Image and Data Output in STN 8-/16-Grayscale Mode
92CF26A-555
2007-11-21
TMP92CF26A
STN 64-grayscale (1-pixel display data = 6-bit memory data) Display Memory
Address 0 LSB D0 0 1 23 456 7 Address 1 Address 2 Address 3 MSB D31 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Address 4 LSB D0
Address 5
Address 6
Address 7 MSB D31
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
Address 8 LSB D0
Address 9
Address 10
Address 11 MSB D31
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
LD Bus Output 8-bit type LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 5-0 11-6 17-12 23-18 29-24 35-30 41-36 47-42 53-48 59-54 65-60 71-66 77-72 83-78 89-84 95-90
Figure 3.19.4 Memory Map Image and Data Output in STN 64-Grayscale Mode
92CF26A-556
2007-11-21
TMP92CF26A
STN 256-color (1-pixel display data = 8-bit memory data (R: 3 bits, G: 3 bits, B: 2 bits)) Display Memory
Address 0 LSB D0 0 1 R0 23 456 G0 Address 4 LSB D0 7 Address 1 Address 2 Address 3 MSB D31 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 R1 G1 Address 5 B1 R2 G2 Address 6 B2 R3 G3 Address 7 MSB D31 B3
B0
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 R4 G4 B4 R5 G5 B5 R6 G6 B6 R7 G7 B7
LD Bus Output 8-bit type LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 2-0(R0) 5-3(G0) 7-6(B0) 10-8(R1) 13-11(G1) 15-14(B1) 18-16(R2) 21-19(G2) 23-22(B2) ... 26-24(R3) ... 29-27(G3) ... 31-30(B3) ... 34-32(R4) ... 37-35(G4) ... 39-38(B4) ... 42-40(R5) ...
Figure 3.19.5 Memory Map Image and Data Output in STN 256-Color Mode
92CF26A-557
2007-11-21
TMP92CF26A
STN 4096-color (12 bpp: R: 4 bits, G: 4 bits, B: 4 bits) Display Memory
Address 0 LSB D0 0 1 R0 23 456 G0 Address 4 LSB D0 7
Address 1
Address 2
Address 3 MSB D31
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 B0 R1 Address 5 G1 B1 Address 6 R2 Address 7 MSB D31 G2
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 B2 LD Bus Output 8-bit type LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 3-0(R0) 7-4(G0) 11-8(B0) 15-12(R1) 19-16(G1) 23-20(B1) 27-24(R2) 31-28(G2) 35-32(B2)... 39-36(R3)... 43-40(G3)... 47-44(B3)... 51-48(R4)... 55-52(G4)... 59-56(B4)... 63-60(R5)... R3 G3 B3 R4 G4 B4 R5
Figure 3.19.6 Memory Map Image and Data Output in STN 4096-Color Mode
92CF26A-558
2007-11-21
TMP92CF26A
STN 65536-color (16bpp: R: 5 bits, G: 6 bits, B: 5 bits) Display Memory
Address 0 LSB D0 0 1 23 456 7 Address 1 Address 2 Address 3 MSB D31 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
R0 LSB D0
Address 4
G0
B0 Address 5
R1
Address 6
G1
Address 7 MSB D31
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 R2 Address 8 LSB D0 G2 B2 Address 9 R3 Address 10 G3 B3 Address 11 MSB D31
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 R4 G4 B4 R5 G5 B5
LD Bus Output 8-bit type LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 4-0(R0) 10-5(G0) 15-11(B0) 20-16(R1) 26-21(G1) 31-27(B1) 36-32(R2) 42-37(G2) 47-43(B2)... 52-48(R3)... 58-53(G3)... 63-59(B3)... 68-64(R4)... 74-69(G4)... 79-75(B4)... 84-80(R5)...
Figure 3.19.7 Memory Map Image and Data Output in STN 65536-Color Mode
92CF26A-559
2007-11-21
TMP92CF26A
TFT 256-color (1-pixel display data = 8-bit memory data (R: 3 bits, G: 3 bits, B: 2 bits) Display Memory
Address 0 LSB D0 0 1 R0 23 456 G0 Address 4 LSB D0 7 Address 1 Address 2 Address 3 MSB D31 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 R1 G1 Address 5 B1 R2 G2 Address 6 B2 R3 G3 Address 7 MSB D31 B3
B0
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 R4 G4 B4 R5 G5 B5 R6 G6 B6 R7 G7 B7
12bit (TFT) LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 0(R0) 1(R0) 2(R0) 3(G0) 4(G0) 5(G0) 6(B0) 7(B0) 8(R1) 9(R1) 10(R1) 11(G1) 12(G1) 13(G1) 14(B1) 15(B1) ... ... ... ... ... ... ... ...
Figure 3.19.8 Memory Map Image and Data Output in TFT 256-Color Mode
92CF26A-560
2007-11-21
TMP92CF26A
TFT 4096-color (1-pixel display data = 12-bit memory data (R: 4 bits, G: 4 bits, B: 4 bits) Display Memory
Address 0 LSB D0 0 1 23 R0 456 G0 Address 4 LSB D0 7 Address 1 Address 2 Address 3 MSB D31 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 B0 R1 Address 5 G1 B1 Address 6 R2 G2 Address 7 MSB D31
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 B2 12-bit TFT LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 LD8 LD9 LD10 LD11 0(R0) 1(R0) 2(R0) 3(R0) 4(G0) 5(G0) 6(G0) 7(G0) 8(B0) 9(B0) 10(B0) 11(B0) 12(R1) ... 13(R1) ... 14(R1) ... 15(R1) ... 16(G1) ... 17(G1) ... 18(G1) ... 19(G1) ... 20(B1) ... 21(B1) ... 22(B1) ... 23(B1) ... R3 G3 B3 R4 G4 B4 R5
Figure 3.19.9 Memory Map Image and Data Output in TFT 4096-Color Mode
92CF26A-561
2007-11-21
TMP92CF26A
TFT 65536-color (16 bpp: R: 5 bits, G: 6 bits, B: 5 bits) Display Memory
Address 0 LSB D0 0 1 23 R0 Address 4 LSB D0 456 7 Address 1 Address 2 Address 3 MSB D31 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 G0 B0 Address 5 R1 Address 6 G1 B1 Address 7 MSB D31
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 R2 G2 B2 R3 G3 B3
16-bit TFT LD0 LD1 LD2 LD3 LD4 LD5 LD6 LD7 LD8 LD9 LD10 LD11 LD12 LD13 LD14 LD15 0(R0) 1(R0) 2(R0) 3(R0) 4(R0) 5(G0) 6(G0) 7(G0) 8(G0) 9(G0) 10(G0) 11(B0) 12(B0) 13(B0) 14(B0) 15(B0) 16(R1) ... 17(R1) ... 18(R1) ... 19(R1) ... 20(R1) ... 21(G1) ... 22(G1) ... 23(G1) ... 24(G1) ... 25(G1) ... 26(G1) ... 27(B1) ... 28(B1) ... 29(B1) ... 31(B1) ... 32(B1) ...
Figure 3.19.10 Memory Map Image and Data Output in TFT 65536-Color Mode
92CF26A-562
2007-11-21
TMP92CF26A
TFT 262144-/16777216-color (24 bpp: R: 8 bits, G: 8 bits, B: 8 bits) Display Memory
Address 0 LSB D0 0 1 23 R0 Address 4 LSB D0 456 7 Address 1 Address 2 Address 3 MSB D31 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 G0 Address 5 B0 Address 6 R1 Address 7 MSB D31
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
G2 24bit (TFT) LD18 LD19 LD0 LD1 LD2 LD3 LD4 LD5 LD20 LD21 LD6 LD7 LD8 LD9 LD10 LD11 LD22 LD23 LD12 LD13 LD14 LD15 LD16 LD17 0(R0) 1(R0) 2(R0) 3(R0) 4(R0) 5(R0) 6(R0) 7(R0) 8(G0) 9(G0) 10(G0) 11(G0) 12(G0) 13(G0) 14(G0) 15(G0) 16(B0) 17(B0) 18(B0) 19(B0) 20(B0) 21(B0) 22(B0) 23(B0) 24(R1) 25(R1) 26(R1) 27(R1) 28(R1) 29(R1) 30(R1) 31(R1) 32(G1) 33(G1) 34(G1) 35(G1) 36(G1) 37(G1) 38(G1) 39(G1) 40(B1) 41(B1) 42(B1) 43(B1) 44(B1) 45(B1) 46(B1) 47(B1) ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
B2 18bit (TFT)
R3
G3
LD0 LD1 LD2 LD3 LD4 LD5
2(R0) 3(R0) 4(R0) 5(R0) 6(R0) 7(R0)

26(R1) 27(R1) 28(R1) 29(R1) 30(R1) 31(R1)
... ... ... ... ... ...
LD6 LD7 LD8 LD9 LD10 LD11
10(G0 11(G0) 12(G0) 13(G0) 14(G0) 15(G0)

34(G1) 35(G1) 36(G1) 37(G1) 38(G1) 39(G1)
... ... ... ... ... ...
LD12 LD13 LD14 LD15 LD16 LD17
18(B0) 19(B0) 20(B0) 21(B0) 22(B0) 23(B0)

42(B1) 43(B1) 44(B1) 45(B1) 46(B1) 47(B1)
... ... ... ... ... ...
Note: The display RAM data format for 18 bpp is the same as that for 24 bpp. When 18 bpp is used, the least significant bit should be disabled by port setting.
Figure 3.19.11 Memory Map Image and Data Output in TFT 262144-/16777216-Color Mode
92CF26A-563
2007-11-21
TMP92CF26A
(7) LDIV Signal The and bits of the LCDMODE1 register are used to control the LDIV signal as well as data output. The LDIV signal indicates the inversion of all the LD bus signals. When LCDMODE1=1, all display data is forcefully inverted and the LDIV signal is also driven high. When LCDMODE1=1, the data that has just been transferred and the data to be transferred next are compared. If there are more changed bits than unchanged bits (for example, 7 or more bits are changed when using a 12-bit bus, and 5 or more bits are changed when using a 8-bit bus), the data is inverted and the LDIV signal is also driven high. This function can be used with TFT source drivers having the data inversion function to reduce radiated noise and power consumption due to high-speed data inversion. If and are both set to "1" at the same time, is given priority and is disabled.
92CF26A-564
2007-11-21
TMP92CF26A 3.19.4 Interrupt Function
The LCDC has two types of interrupts. One is generated synchronous with the LLOAD signal and the other is generated synchronous with the LLOAD signal that is output immediately after the LVSYNC signal. LCDMODE1 is used to switch between these two types of interrupts.
LVSYNC
LHSYNC
LLOAD D15-0(VRAM Read) Interrupt request
LCDMODE1=0
Interrupt request
LCDMODE1=1
When LCDMODE1=0, an interrupt request is generated at the start of each VRAM read before the LLOAD generates (once in each LLOAD period). When LCDMODE1=1, an interrupt request is generated at the start of VRAM read before the first LLOAD generates (once in each LVSYNC period).
Note: The interrupt request generates when reading the data from VRAM at once. Since reading from VRAM is executed by DMA with bus request to the CPU, DMA operation is given priority. Thus CPU accepts interrupt immediately after reading the data from VRAM.
LCDMODE1 Register 7
LCDMODE1 (0281H) bit Symbol Read/Write Reset State Function 0 0 0 Data rotation function (Supported for 64K-color: 16bps only) 000: Normal 010: Vertical flip 111: Reserved Note: The LCDMODE1 setting must not be changed while the LCDC is operating. Be sure to set LCDCTL0 to "0" to stop the LCDC operation before changing the interrupt setting. 100: 90-degree 110: Reserved 0: Normal 1: Invert 001: Horizontal flip 101: Reserved 011: Horizontal & vertical flip LDC2
6
LDC1
5
LDC0 R/W
4
LDINV 0 LD bus inversion
3
AUTOINV 0 Auto bus inversion 0: Disable 1: Enable (Valid only for TFT)
2
INTMODE 0 Interrupt selection
1
FREDGE W 0 LFR edge
0: LHSYNC
0
SCPW2 0 LD bus Trance Speed 0: normal
0:LLOAD 1:LVSYNC
Front Edge EAR Edge 1:LHSYNCR 1: 1/3
92CF26A-565
2007-11-21
TMP92CF26A 3.19.5 Special Functions
The TMP92CF26A includes a PIP (Picture in Picture) function that allows a different screen to be displayed over the screen currently being displayed on the LCD. The PIP function manages the address space of display memory by dividing it into "main screen" and "sub screen". For the main screen, the display size and start address are specified as in the case of the normal screen display. For the sub screen, the display size and start address are also specified for determining the position and size of the sub screen. When the HOT point (upper-left corner) and segment/common size are set for the sub screen and the PIP function is enabled by setting LCDCTL0 to "1", the sub screen is displayed over the main screen.
3.19.5.1 PIP (Picture in Picture) Function
HOT Point
LCD Panel (PIP OFF)
LCD Panel (PIP ON)
Main Area Start Address
Note: This is just an image of memory map and doesn't describe the image of bit map.
Sub Area Start Address
VRAM Memory Map Main Area Sub Area Sub Area Case1: Main Area sizeSub Area size Case2: Sub Area exceed Main Area Main Area
Note: Always set Sub Area within Main Area. The size that is bigger than the Main Area can not be set to the Sub Area, and the Sub area setting that lap Main Area.
92CF26A-566
2007-11-21
TMP92CF26A
The table below shows the HOT point locations that can be specified. *VRAM Access
Monochrome display 4-grayscale display 16-grayscale display 64-grayscale display 256-color display 4K-color display 64K-color display TFT 256k/16M-color display 16bit 32bit 16bit 32bit 16bit 32bit 16bit 32bit 16bit 32bit 16bit 32bit 16bit 32bit 16bit 32bit
HOT_Point(X_dir)
In units of 16 dots In units of 32 dots In units of 8 dots In units of 16 dots In units of 4 dots In units of 8 dots In units of 8 dots In units of 16 dots In units of 2 dots In units of 4 dots In units of 4 dots In units of 8 dots In units of 1 dots In units of 2 dots In units of 2 dots In units of 4 dots
HOT_Point(Y_dir)
In units of 1 line
Note 1: The "VRAM Access" colomn shows the bus size for accessing the display RAM. When external RAM is used, the bus size depends on the bit width of the external RAM to be used. When the internal RAM is used VRAM is always accessed via a 32-bit bus. Note 2: The same RAM must be used for both the main and sub areas.
The table below shows the HOT point segment and common sizes that can be specified. *VRAM Access
Monochrome display 4-grayscale display 16-grayscale display 64-grayscale display 256-color display 4K-color display 64K-color display TFT 256k/16M-color display
Segment size Minimum size units
In units of 16 dots In units of 32 dots In units of 8 dots In units of 16 dots In units of 4 dots In units of 8 dots In units of 8 dots In units of 16 dots In units of 2 dots In units of 4 dots In units of 4 dots In units of 8 dots In units of 1 dots In units of 2 dots In units of 2 dots In units of 4 dots
Common size
16bit 32bit 16bit 32bit 16bit 32bit 16bit 32bit 16bit 32bit 16bit 32bit 16bit 32bit 16bit 32bit
32 dots 64 dots 16 dots 32 dots 8 dots 16 dots 16 dots 32 dots 4 dots 8 dots 8 dots 16 dots 2 dots 4 dots 4 dots 8 dots
In units of 1 line
92CF26A-567
2007-11-21
TMP92CF26A
LCD Main Area Start Address Register 7
LSAML bit Symbol Reset State Function LMSA7 0 (02A0H) Read/Write 0 0
6
LMSA6
5
LMSA5
4
LMSA4 R/W 0
3
LMSA3 0
2
LMSA2 0
1
LMSA1 0
0
LCD main area start address (A7-A1)
7
LSAMM bit Symbol Reset State Function LMSA15 0 (02A1H) Read/Write
6
LMSA14 0
5
LMSA13 0
4
LMSA12 R/W 0
3
LMSA11 0
2
LMSA10 0
1
LMSA9 0
0
LMSA8 0
LCD main area start address (A15-A8)
7
LSAMH bit Symbol Reset State Function LMSA23 0 (02A2H) Read/Write
6
LMSA22 1
5
LMSA21 0
4
LMSA20 R/W 0
3
LMSA19 0
2
LMSA18 0
1
LMSA17 0
0
LMSA16 0
LCD main area start address (A23-A16)
LCD Sub Area Start Address Register 7
LSASL (02A4H) bit Symbol Read/Write Reset State Function 0 0 0 LSSA7
6
LSSA6
5
LSSA5
4
LSSA4 R/W 0
3
LSSA3 0
2
LSSA2 0
1
LSSA1 0
0
LCD sub area start address (A7-A1)
7
LSASM (02A5H) bit Symbol Read/Write Reset State Function 0 LSSA15
6
LSSA14 0
5
LSSA13 0
4
LSSA12 R/W 0
3
LSSA11 0
2
LSSA10 0
1
LSSA9 0
0
LSSA8 0
LCD sub area start address (A15-A8)
7
LSASH (02A6H) bit Symbol Read/Write Reset State Function 0 LSSA23
6
LSSA22 1
5
LSSA21 0
4
LSSA20 R/W 0
3
LSSA19 0
2
LSSA18 0
1
LSSA17 0
0
LSSA16 0
LCD sub area start address (A23-A16)
92CF26A-568
2007-11-21
TMP92CF26A
LCD Sub Area HOT Point Register (X-dir) 7
LSAHX (02A8H) bit Symbol Read/Write Reset State Function 0 0 0 0 SAHX7
6
SAHX6
5
SAHX5
4
SAHX4 R/W
3
SAHX3 0
2
SAHX2 0
1
SAHX1 0
0
SAHX0 0
LCD sub area HOT point (7-0)
7
(02A9H) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
SAHX9 R/W 0 point (9-8)
0
SAHX8 0
LCD sub area HOT
LCD Sub Area HOT Point Register (Y-dir) 7
LSAHY (02AAH) bit Symbol Read/Write Reset State Function 0 0 0 0 SAHY7
6
SAHY6
5
SAHY5
4
SAHY4 R/W
3
SAHY3 0
2
SAHY2 0
1
SAHY1 0
0
SAHY0 0
LCD sub area HOT point (7-0)
7
(02ABH) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
0
SAHY8 R/W 0 LCD sub area HOT point (8)
Note: The HOT point should be set in units of the specified number of dots, which is determined by the display color mode and display RAM access data bus width.
LCD Sub Area Display Segment Size Register 7
LSASS (02ACH) bit Symbol Read/Write Reset State Function 0 0 0 0 SAS7
6
SAS6
5
SAS5
4
SAS4 R/W
3
SAS3 0
2
SAS2 0
1
SAS1 0
0
SAS0 0
LCD sub area segment size (7-0)
7
(02ADH) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
SAS9 R/W 0 size (9-8)
0
SAS8 0
LCD sub area segment
Note: The segment size should be set in units of the specified number of dots, which is determined by the display color mode and display RAM access data bus width.
92CF26A-569
2007-11-21
TMP92CF26A
LCD Sub Area Display Common Size Register 7
LSACS (02AEH) bit Symbol Read/Write Reset State Function 0 0 0 0 SAC7
6
SAC6
5
SAC5
4
SAC4 R/W
3
SAC3 0
2
SAC2 0
1
SAC1 0
0
SAC0 0
LCD sub area common size (7-0)
7
(02AFH) bit Symbol Read/Write Reset State Function
6
5
4
3
2
1
0
SAC8 R/W 0
LCD sub area common size (8)
Note: The common size should be set in units of 1 line.
92CF26A-570
2007-11-21
TMP92CF26A
3.19.5.2 Display Data Rotation Function When display RAM data is output to the LCD driver (LCDD), the data output direction can be automatically rotated by hardware to meet the specifications of the LCDD (or LCD module) to be used. Table 3.19.2 Operation Conditions
Item Display size Color mode Supported LCDD Display RAM Vertical/Horizontal Flip Function 320 x 240 64K colors (16 bpp) TFT, STN Internal RAM, external SRAM 90-Degree Rotation Function 320x240 240 x 320 64K colors (16 bpp) TFT, STN Internal RAM, external SRAM
1.
Horizontal and Vertical Flip Function
Display RAM image
Normal display
Horizontally flipped
Vertically flipped
Horizontally and vertically flipped
The display RAM image shown above uses the data scan method for the normal display screen so that data is read from the display RAM and written to the LCDD from left to right and top to bottom. The data on the LCD screen appears as "horizontally flipped" if data is read from the display RAM from left to right and top to bottom and written to the LCDD from right to left and top to bottom. Likewise, the data on the LCD screen appears as "vertically flipped" if data is written to the LCDD from left to right and bottom to top, or as "horizontally and vertically flipped" if the data is written to the LCDD from right to left and bottom to top. The horizontal and vertical flip function enables the output of display data to meet the specifications of each LCDD without the need to rearrange the display RAM data. In other words, the screen display can be flipped horizontally and vertically without the need to rewrite the display RAM data.
92CF26A-571
2007-11-21
TMP92CF26A
2.
90-Degree Rotation Function
Display RAM Image (QVGA 320x240)
QVGA (320x240)
Portrait-type QVGA (240x320) (when this function is used)
The display RAM image above shows typical data of QVGA size (320 segments x 240 commons: landscape type). If the LCDD to be used is of landscape type, the data can be written to the LCDD without any problem. If the LCDD to be used is of portrait type (240 segments x 320 commons), the data cannot be displayed properly. This function enables the orientation of each display image to be rotated 90 degrees without the need to change the display RAM data.
92CF26A-572
2007-11-21
TMP92CF26A
3. Setting Method
The bits in the LCDMODE1 register are used to set the display data rotation function. LCDMODE1 Register 7
LCDMODE1 (0281H) bit Symbol Read/Write Reset State Function 0 0 0 Data rotation function (Supported for 64K-color: 16bps only) 000: Normal 010: Vertical flip 111: Reserved Note: The setting must not be changed while the LCDC is operating. Be sure to set LCDCTL0 to "0" to stop the LCDC operation before changing . 100: 90-degree 110: Reserved 0: Normal 1: Invert 001: Horizontal flip 101: Reserved 011: Horizontal & vertical flip LDC2
6
LDC1
5
LDC0 R/W
4
LDINV 0 LD bus inversion
3
AUTOINV 0 Auto bus inversion 0: Disable 1: Enable (Valid only for TFT)
2
INTMODE 0 Interrupt selection 0:LLOAD
1
FREDGE W 0 LFR edge
0: LHSYNC Front Edge
0
SCPW2 0 LD bus Trance Speed
1:LVSYNC 1:LHSYNCR 0: normal EAR Edge 1: 1/3
When the horizontal and vertical flip function or 90-degree rotation function is used, the display RAM start address of main/sub area should be set differently from when in normal mode, as shown in the table below.
Display RAM Start Address Setting Example 00000h 257FEh 00000h 257FEh 257FEh
Mode Normal 90-degree rotation Horizontal flip Vertical flip Horizontal and vertical flip
Setting Point Point A Point B Point A Point B Point B
How to calculate the point B address: (320x240x16/8) -2 = 153600-2 = 153598 [decimal] = 257FE [hex] Point A
Point B Display RAM Image (QVGA 320 x 240)
92CF26A-573
2007-11-21
TMP92CF26A
3.19.5.3 Considerations for Using the LCDC 1. If the operation mode is changed while the LCDC is operating, a maximum of one frame may not be displayed properly. Although this degree of disturbance does not normally pose any problem (e.g. no response on LCD, display not visible to human eyes), the actual operation largely depends on the conditions such as the LCD driver, LCD panel, and frame frequency to be used. It is therefore recommended that operation checks be performed under the actual conditions. The LCDMODE1 setting must not be changed while the LCDC is operating. Be sure to set LCDCTL0 to "0" to stop the LCDC operation before changing . The LCDC obtains the bus from the CPU when it has some operation to perform. Since the TMP92CF26A includes other units that act as bus masters such as HDMA and SDRAMC, it is necessary to estimate the bus occupancy rate of each bus master in advance. For details, see the chapter on HDMA.
2.
3.
92CF26A-574
2007-11-21
TMP92CF26A 3.19.6
*
Setting Example
STN
CO M 001
240CO Mx80SEG LCD (Color Panel)
SEG001 SEG240 ,V0LR,V2LR, VSSLR,V3LR ,V5LR VCCLR TEST DUAL VSS O240 SEG240
TM P92CF26A
VDD
T6C13B (240-row Driver)
VDD VSS DIR TEST Di7-Di0 DUAL SCP S/C VCCL/R, V0L/R, V1L/R, V4L/R, V5L/R /DSPOF FR O 240 LP EIO2 EIO1 O001
CO M240
CO M 001
VSS
240COMx240SEG LCD(M onochrom e Panel)
SEG001 DIR VDD S/C O001
CO M240
LVSYNC LCP0 LHSYNC LFR port LD7-LD0
open
SCP LP FR /DSPO F DI7-DI0 EIO 1 EIO 2
open
VSS
VDD VSS
T6C13B (240-colum n Driver)
Note: The LCD drive power for LCD display mut be supplied from an external circuit.
Figure 3.19.12 STN-Type LCD Driver Connection Example
92CF26A-575
2007-11-21
TMP92CF26A
*
TFT
JB T6L78-A S (162-g ate D river) TM P 92C F26A
VDD VDD U /D T ES T1 T ES T2 VSS O E 3-1 G 162 G1 G1
VSS
LG O E2-0
160S E G x3(R G B )x162C O M LC D
G 162
DO/I
DI/O
CPV
SC80
SA80
LV S YN C LC P 0 LLO A D LF R LH S YN C LD 23-LD 0 C ontrol S ignal D 15-D 0 A 0-A 23
open
CPH LO A D D I/O D A 5-0
SB80
SC81
SA81
SB81
SC160 SC80 CPH LO A D D O /I D A 5-2 open DC1-0 D B 5-2 D C 5-2
SA160 SA80 DA1-0 VSS
SC80
SA80
SB80
D O /I DB-1-0 DC1-0 D B 5-0 U/D VDD D C 5-0 VSS
D I/O
DA1-0
Axx-Axx
D15-D0
Control Signal
D isp lay M em ory (S D R A M or S R A M )
VDD VSS
JB T6L77-A S x2 (80xR G B S ource D river)
Note: The LCD drive power for LCD display mut be supplied from an external circuit.
Figure 3.19.13 TFT-Type LCD Driver Connection Example
DB1-0
U/D VDD
SB80
SC1
SC1
SA1
SB1
SA1
SB1
SB160
SC1
SA1
SB1
92CF26A-576
2007-11-21
TMP92CF26A
3.19.6.1 Program example TFT-1(TFT panel: 320com x 240seg by H company)
ld ld ld ld ld ld ld ld ldw ldw ld ld ld ld ld ld ld ldl set (lcdmode0),0bdh (lcdmode1),00h (lcdsize),84h (lcdctl0),020h (lcdctl1),0c1h (lcdctl2),00h (lcddvm0),01h (lcddvm1),00h (lcdhsp),278 (lcdvsp),326 (lcdhsdly),3 (lcdlddly),0a3h (lcdo0dly),33 (lcdhsw),2 (lcdldw),100 (lcdho0w),99 (lcdhwb8),01h (lsaml),400000 0,(lcdctl0) ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Divide Frame : Line=1 LHSYNC cycle(LCP0*208),valid data=120 LHSYNC cycle(LCP0*279 LVSYNC cycle(LHSYNC*327) Frame Rate=12.5ns*16*279*327 (54Hz) LHSYNC delay=3*LCP0 LLOAD delay=35*LCP0, =1 LGOE0 delay=33*LCP0 LHSYNC enable width=259*LCP0 LLOAD enable width=101*LCP0 LGOE0 enable width=100*LCP0 =1 main area start address set LCDC start 320com,240seg PIP-OFF, Divide Frame ON: Line LCP0 negedge, LHSYNC negedge, LVSYNC posedge, LLOAD posedge VRAM:SDRAM, fSYS*16-clk, TFT256K color
LVSYNC 1 2 3 327
LHSYNC LGOE0 LLOAD LD17-LD0 LFR
279LCP0
LHSYNC LGOE0 LLOAD
LCDLDDLY = 1
3LCP0
259LCP0
33LCP0
101LCP0
35LCP0
3LCP0
LCP0
3LCP0
LD17-LD0
1
2
3
240
92CF26A-577
2007-11-21
TMP92CF26A
TFT-2(TFT panel: 240com x 320seg by SH company) (fSYS=80MHz)
ld ld ld ld ld (lcdmode0),3dh (lcdmode1),00h (lcdsize),75h (lcdctl0),00h (lcdctl1),061h ; ; ; ; ; 320seg,240com PIP-OFF, Divide Frame-OFF LCP0 posedge, LHSYNC negedge, LVSYNC negedge, LLOAD posedge LVSYNC enable width=LHSYNC*2 ldw ldw ld ld ld (lcdhsp),340 (lcdvsp),252 (lcdprvsp),7 (lcdhsdly),11 (lcdlddly),16 ; ; ; ; ; LHSYNC cycle(LCP0*341) LVSYNC cycle(LHSYNC*253) Frame Rate=12.5ns*16*341*253 (58Hz) Vertical front porch 7 LHSYNC delay=11*LCP0 LLOAD delay=16*LCP0 ,=0 VRAM: In-RAM, fSYS*16-clk, TFT256K color
ld ld ld ldl set
(lcdhsw),2 (lcdldw),64 (lcdhwb8),02h (lsaml),400000h 0,(lcdctl0)
; ; ; ; ;
LHSYNC enable width=3*LCP0 LLOAD enable width=320*LCP0 =1 main area start address set LCDC start
LVSYNC 1 2 8 1
LHSYNC
253
LLOAD LD17-LD0
341LCP0 3LCP0
LHSYNC
11LCP0
LLOAD
LCDLDDLY = 0
16LCP0
320LCP0
LCP0
5LCP0
LD17-LD0
1
2
3
320
92CF26A-578
2007-11-21
TMP92CF26A
TFT-3(TFT panel: 320com x 240seg by TM company) (fSYS=80MHz)
ld ld ld ld ld ld ld ld ldw ldw ld ld ld ld ld ld ld ld ldl set (lcdmode0),7dh (lcdmode1),00h (lcdsize),84h (lcdctl0),20h (lcdctl1),0e0h (lcdctl2),00h (lcddvm0),01h (lcddvm1),00h (lcdhsp),284 (lcdvsp),324 (lcdprvsp),0 (lcdhsdly),11 (lcdlddly),096h (lcdo0dly),16 (lcdhsw),7 (lcdldw),1 (lcdho0w),66 (lcdhwb8),0 (lsaml),400000h 0,(lcdctl0) ; ; main area start address set LCDC start ; ; ; ; ; ; ; ; ; ; ; ; ; LHSYNC cycle (LCP0*285) LVSYNC cycle(LHSYNC*325) Frame Rate=12.5ns*16*285*325 (54Hz) Vertical front porch=0 LHSYNC delay=11*LCP0 LLOAD delay=22*LCP0, =1 LGOE0 delay=16*LCP0 LHSYNC enable width=8*LCP0 LLOAD enable width=2*LCP0 LGOE enable width=67*LCP0 320com,240seg PIP-OFF, Divide Frame ON: Line LCP0 negedge, LHSYNC negedge, LVSYNC negedge, LLOAD posedge LGOE posedge divide Line=1 VRAM:SDRAM, fSYS*16-clk, TFT256K color
LVSYNC 1 2 1
LHSYNC LLOAD LGOE0 LD17-LD0
320
325
285LCP0 8LCP0
LHSYNC LLOAD
LCDLDDLY = 1
11LCP0 22LCP0 2LCP0
LGOE0 LCP0 LD17-LD0
16LCP0
67LCP
1
2
3
240
5LCP0
92CF26A-579
2007-11-21
TMP92CF26A
3.20 Touch Screen Interface (TSI)
An interface for 4-terminal resistor network touch-screen is built in. The TSI easily supports two procedures: ouch detection and X/Y position measurement. Each procedure is performed by setting the TSI control register (TSICR0 and TSICR1) and using an internal AD converter.
3.20.1
Touch-Screen Interface Module Internal/External Connection
TMP92CF26A
YMY X+ Touch Screen XMX PY PX Y+
External Capacitors
Figure 3.20.1External connection of TSI
Touch screen control AVCC PXEN AVSS SPY SPX Dec. PYEN MXEN P97 (PY) P96/INT4 (PX) PXD (typ.50k) PG3/AN3 (MY) PG2/AN2 (MX) SMX VREFH SMY AN3 AN2 AVCC AVSS VREFH VREFL VREFL AD converter MYEN INT4 TSI7 INT4 PTST
Figure 3.20.2 Internal block diagram of TSI
92CF26A-580
2007-11-21
Internal data bus
TMP92CF26A 3.20.2 Touch Screen Interface (TSI) Control Register
TSI control register 7
TSICR0 (01F0H) bit Symbol Read/Write Reset State Function 0 0: Disable 1: Enable TSI7 R/W 0 Input gate control of Port 96,97 0: Enable 1: Disable PXD (internal pull-down resistor) ON/OFF setting

6
INGE
5
PTST R 0 Detection condition 1: touch INT4
4
TWIEN 0 SPY interrupt 0: Disable 1: Enable
3
PYEN 0 SPX 0 : OFF 1 : ON
2
PXEN R/W 0
1
MYEN 0 SMY 0 : OFF 1 : ON
0
MXEN 0 SMX 0 : OFF 1 : ON
0 : OFF 1 : ON
0: no touch control
0 1
0 OFF ON
1 OFF OFF
Debounce time setting register 7
TSICR1 (01F1H) bit Symbol Read/Write Reset State Function 0 0: Disable 1: Enable 0 1024 0 256 0 64 DBC7
6
DB1024
5
DB256
4
DB64 R/W
3
DB8 0 8
2
DB4 0 4
1
DB2 0 2
0
DB1 0 1
Debounce time is set by the formula "(N*64-16) / fSYS". "N" is the number of bits between bit6 and bit0 which are set to "1". Note3:
Note1: Since the CPU clock is used for the debounce circuit, the debounce circuit does not operate and also no interrupts that bypass the debounce circuit are generated during IDLE1and STOP mode, or the PCM state. During IDLE1 or STOP mode, set this circuit to disable (Write "0" in TSICR1) before entering the HALT stateIf debounce time is set to "0", the signal is captured into the inside after a count of 6 system clocks (fSYS) from the point when this circuit is set to disable. Note2: To avoid a flow-through current to the normal C-MOS input gate when converting analog input data by using the AD converter, TSICR0 can be controlled. If the intermediate voltage is input, cut the input signal to the C-MOS logic (P96,P97) by setting this bit. TSICR0 is to confirm the initial pen-touch. Note that, when the input to the C-MOS logic is blocked by TSICR0, this bit is always "1". Note3: For example: TSICR1=95H N = 64 + 4 + 1 = 69, if set to (TSICR1) = 95 h
92CF26A-581
2007-11-21
TMP92CF26A 3.20.3 Touch detection procedure
The touch detection procedure includes the procedure starting from when the pen is touched onto the touch screen and until the pen-touch is detected. Touching the screen generates the interrupt (INT4) and terminates this procedure. After an X/Y position measuring procedure is terminated, return to this procedure to wait for the next touch. When waiting for a touch with no contact, set only the SPY switch to ON and set all other three switches (SMY, SPX, SMX) to OFF. At this time, the pull-down resistor built in the P96/INT4/PX pin is set ON.. In this state, because the internal X- and Y-direction resistors in the touch screen are not connected, the P96/INT4/PX pin is set to Low by the internal pull-down resistor (PXD), generating no INT4 interrupt When a next pen-touch is given, the X- and Y-direction internal resistors in the touch screen are connected, which sets the P96/INT4/PX pin to High and generates an INT4 interrupt To avoid generating more than one INT4 interrupt by one pen-touch, the debounce circuit as shown below is provided. Setting debounce time in the TSICR1 register ignores pulses whose time equals to or is below the set time. The debounce circuit detects a rising of signal to count up a set debounce counter time and then captures the signal into the inside after counting. When the signal turns to "L" during counting, the counter is cleared, starting to wait for a rising edge again. TSICR1 Debounce circuit TSICR0, IIMC,
Enables INT4, And select the Rising or Falling of INT4
P96/INT4 pin
INT4
F/F
TSICR0
Figure 3.20.3 Block diagram of debounce circuit
92CF26A-582
2007-11-21
TMP92CF26A
P96/INT4 pin
Reset the debounce time counter Start the debounce time counter
Debounce time INT4
Debounce time
Debounce time
The debounce time counter matches with a specified debounce time, which generates an INT4 interrupt. After the pen is released, an INT4 interrupt can be received again. No INT4 interrupt is generated due to edge interrupt even though the debounce time counter matches a specified debounce time.
Figure 3.20.4 Timing diagram of debounce circuit
92CF26A-583
2007-11-21
TMP92CF26A 3.20.4 X/Y position measuring procedure
During the routine of pen-touch and INT4 interrupt generation, execute a pen position measuring following the procedure below: Make the SPX and SMX switches ON, and the SPY and SMY switches OFF. With this setting, an analog-voltage that shows the X position will be input to the PG3/MY/AN3 pin. The X-position coordinate can be measured by converting this voltage to digital code using the AD converter. Make the SPY and SMY-switches ON, and the SPX and SMX switches OFF. With this setting, an analog voltage that shows the Y position will be input to the PG2/MX/AN2 pin. The Y position can be measured by converting this voltage to digital code using the AD converter. The above analog voltage which is input to AN3 and AN2 pins during the X and Y position measurement above can be determined with the ratio between the ON resistance value of the switch in the TMP92CF26A and the resistance value in the touch screen as shown in Figure 3.20.5. Therefore, even when touching an end area on the touch screen, the analog input voltage will be neither 3.3V nor 0.0V. Note that the rate of each resistance varies. Remember to take this into consideration during designing. It is also recommended that an average taken from several AD conversions performed if required be adopted as the final correct value.
[Analog input voltage to theAN2 and AN3 pins: Formula to calculate E1] SPY (SPX) ON-resistor: Rpy (Rpx) typ.10 Ex.) Where AVCC=3.3V, Rpy=Rmy=10, R1=400 and R2=100 Touch screen resistor : Rty (Rtx) The resistance depends on the touch screen. R2 Touch-point SMY (SMX) ON-resistor: Rmy (Rmx) typ.10 R1 E1 = ((100+10) / (10+400+100+10) x 3.3 = 0.698V AN2 (AN3)-pin Note1: An X-coordinate position can be calculated in the same way though above formula is for Y-coordinate position. Note2: Rty = R1+R2. AVCC=3.3V E1 = ((R2+Rmy) / (Rpy+Rty+Rmy)) x AVCC [V]
Figure 3.20.5 Calculation analog voltage
92CF26A-584
2007-11-21
TMP92CF26A 3.20.5 Flow chart for TSI
(1) Touch Detection Procedure
(2) X/Y Position Measuring Procedure INT4 Routine:
(a)
Main Routine:
TSICR098H TSICR1XXH (voluntary)
TSICR0C5H Execute the Main Routine AN3 AD conversion Store the AD conversion result
(b)
TSICR0CAH AN2 AD conversion Store the AD conversion result
(c)
Execute the processes by using X/Y-coordinate position information Yes Still touched? TSICR0 = 1?
No Return to the Main Routine
Figure 3.20.6 Flow chart for TSI The following pages explain each circuit condition (a), (b) and (c) in the flow chart above:
92CF26A-585
2007-11-21
TMP92CF26A
(a) Main routine (condition of waiting INT4 interrupt)
(p9fc), = "1" (inte34) (tsicr0)=98h ei : : : : Set P96 to int4/PX, set P97 to PY Set interrupt level of INT4 Pull-down resistor on, SPY on, Interrupt-set Enable interrupt
TMP92CF26A
Touch screen control AVCC PXEN ON SPY (PY/P97) Y+ Touch Screen XX+ (MY/PG3) Y(MX/PG2) AN2 SMX SMY AVCC AVSS VREFH VREFL AVSS VREFH VREFL PXD (typ.50k) AD Converter AN3 (PX/P96/INT4) ON SPX Dec. PYEN MXEN MYEN INT4 TSI7 Internal data bus PTST
92CF26A-586
2007-11-21
TMP92CF26A
(b) INT4 routine: X-position coordinate measurement (AD conversion start)
(tsicr0)=c5h (admod1)=b0h (admod0)=08h : : : Set SMX, SPX to ON. Set the input gate of P97, P96 to OFF. Set to AN3. Start AD conversion.
TMP92CF26A
AVCC ON SPY (PY/P97) Y+ Touch Screen XX+ (MY/PG3) Y(MX/PG2) AN2 SMX ON VREFH VREFL AVSS SMY AVCC AVSS VREFH VREFL PXD (typ.50k) AD Converter AN3 (PX/P96/INT4) TSI7 MYEN INT4 Internal data bus PTST SPX Dec. Touch screen control PXEN PYEN MXEN
92CF26A-587
2007-11-21
TMP92CF26A
(c) INT4 routine: Y-position coordinate measurement (AD conversion start)
(tsicr0)=cah (admod1)=a0h (admod0)=08h : : : Set SMX, SPX to ON. Set the input gate of P97, P96 to OFF. Set to AN2. Start AD conversion.
TMP92CF26A
Touch screen control AVCC ON SPY (PY/P97) Y+ Touch XScreen X+ (MY/PG3) Y(MX/PG2) AN2 SMX VREFH VREFL AVSS SMY AVCC ON AVSS VREFH VREFL PXD (typ.50k) AD Converter AN3 (PX/P96/INT4) SPX Dec. PXEN PYEN MXEN MYEN INT4 TSI7 Internal data bus PTST
92CF26A-588
2007-11-21
TMP92CF26A 3.20.6 Use Cautions
1. Debounce circuit The CPU system clock is used in debounce circuit. Therefore, when no clock is supplied to the CPU (during IDLE1 and STOP modes, or PCM state), the debounce circuit does not operate. Because of this, interrupts bypassing the debounce circuit are not generated either. When using a startup that uses the TSI starting from the state during IDLE1 and STOP modes, or the PCM state, set the debounce circuit to disable before entering the HALT or PCM state. (TSICR1= "0") 2. Port setting When an intermediate voltage of 0 V to AVcc is converted using the AD converter, the intermediate voltage is also applied to the normal C-MOS input gates (P96 and P97) due to the circuit structure. Take measures against the flow-through current to Port 96 and 97 by using TSICR0. At this time (TSICR0= "1"). Note that blocking the input to the C-MOS logics sets "1" at all times in TSICR0 that confirms a first pen-touch.
92CF26A-589
2007-11-21
TMP92CF26A
3.21 Real time clock (RTC)
3.21.1 Function description for RTC
1) Clock function (hour, minute, second) 2) Calendar function (month and day, day of the week, and leap year) 3) 24 or 12-hour (AM/PM) clock function 4) +/- 30 second adjustment function (by software) 5) Alarm function (Alarm output) 6) Alarm interrupt generate
3.21.2
Block diagram
16 Hz Clock 32 KHz Clock Divider 1 Hz Clock Alarm Register Alarm Selector
ALARM ALARM
Carry hold (1s)
Comparator
INTRTC
Clock
Address Bus Adjust RD WR R/W Control D0~D7
Internal data bus
Address
Figure 3.21.1 RTC block diagram
Note 1: Western calendar year column: This product uses only the final two digits of the year. Therefore, the year following 99 is 00 years. In use, please take into account the first two digits when handling years in the western calendar.
Note 2: Leap year: A leap year is divisible by 4, but the exception is any leap year which is divisible by 100; this is not considered a leap year. However, any year which is divisible by 400, is a leap year. This product does not take into account the above exceptions . Since this product accounts only for leap years divisible by 4, please adjust the system for any problems.
92CF26A-590
2007-11-21
TMP92CF26A 3.21.3 Control registers
Table 3.21.1 PAGE 0 (Clock function) registers
Symbol SECR MINR HOURR DAYR DATER YEARR PAGER RESTR Address 1320H 1321H 1322H 1323H 1324H 1326H Day 20 Day 10 Oct. Year 80 Year 40 Year 20 Year 10 Adjustment function 16Hz enable Clock reset Alarm reset Day 8 Aug. Year 8 Clock enable Bit7 Bit6 40 sec 40 min Bit5 20 sec 20 min
20 hours/ PM/AM
Bit4 10 sec 10 min
10 hours
Bit3 8 sec 8 min
8 hours
Bit2 4 sec 4 min
4 hours
Bit1 2 sec 2 min
2 hours
Bit0 1 sec 1 min
1 hour
Function Second column Minute column Hour column Day of the week column Day column Month column Year column (Lower two columns) PAGE register
Read/Write R/W R/W R/W R/W R/W R/W R/W W, R/W W only
W2 Day 4 Apr. Year 4 Alarm enable
W1 Day 2 Feb. Year 2
W0 Day 1 Jan. Year 1 PAGE setting
MONTHR 1325H
1327H Interrupt enable 1328H 1Hz enable
Always write "0"
Reset register
Note: When reading SECR, MINR, HOURR, DAYR, MONTHR, YEARR of PAGE0, the current state is read.
Table 3.21.2 PAGE1 (Alarm function) registers
Symbol SECR MINR HOURR DAYR DATER YEARR PAGER RESTR Address 1320H 1321H 1322H 1323H 1324H 1326H 1327H Interrupt enable 1328H 1Hz enable 16Hz enable Clock reset Adjustment function Alarm reset Clock enable Alarm enable Always write "0" Day 20 Day 10 Day 8 40 min 20 min
20 hours/ PM/AM
Bit7
Bit6
Bit5
Bit4 10 min
10 hours
Bit3 8 min
8 hours
Bit2 4 min
4 hours
Bit1 2 min
2 hours
Bit0 1 min
1 hour
Function Minute column Hour column Day of the week column Day column 24-hour clock mode Leap-year mode PAGE register
Read/Write R/W R/W R/W R/W R/W R/W R/W W, R/W W only
W2 Day 4
W1 Day 2 LEAP1
W0 Day 1 24/12 LEAP0 PAGE setting
MONTHR 1325H
Reset register
Note: When reading SECR, MINR, HOURR, DAYR, MONTHR, YEARR of PAGE1, the current state is read.
92CF26A-591
2007-11-21
TMP92CF26A 3.21.4 Detailed explanation of control register
RTC is not initialized by system reset. Therefore, all registers must be initialized at the beginning of the program. (1) Second column register (for PAGE0 only) 7
SECR (1320H) Bit symbol Read/Write Reset State Function "0" is read. 40 sec. column 20 sec. column 10 sec. column
6
SE6
5
SE5
4
SE4
3
SE3 R/W Undefined 8 sec. column
2
SE2
1
SE1
0
SE0
4 sec. column
2 sec. column
1 sec. column
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1
0 0 0 0 0 0 0 0 1 1 0
0 0 0 0 1 1 1 1 0 0 0
0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 sec 1 sec 2 sec 3 sec 4 sec 5 sec 6 sec 7 sec 8 sec 9 sec 10 sec 19 sec 20 sec 29 sec 30 sec 39 sec 40 sec 49 sec 50 sec 59 sec
:
1 0 0 0
:
1 0 0 0
:
1 0 0 0
:
1 0 0 0
:
1 0 Note: Do not set data other than as shown above.
92CF26A-592
2007-11-21
TMP92CF26A
(2) Minute column register (for PAGE0/1) 7
MINR (1321H) Bit symbol Read/Write Reset State Function "0" is read. 40 min, column 20 min, column 10 min, column
6
MI6
5
MI5
4
MI4
3
MI3 R/W Undefined 8 min, column
2
MI2
1
MI1
0
MI0
4 min, column
2 min, column
1 min, column
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1
0 0 0 0 0 0 0 0 1 1 0
0 0 0 0 1 1 1 1 0 0 0
0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 min 1 min 2 min 3 min 4 min 5 min 6 min 7 min 8 min 9 min 10 min 19 min 20 min 29 min 30 min 39 min 40 min 49 min 50 min 59 min
:
1 0 0 0
:
1 0 0 0
:
1 0 0 0
:
1 0 0 0
:
1 0 Note: Do not set data other than as shown above.
92CF26A-593
2007-11-21
TMP92CF26A
(3) Hour column register (for PAGE0/1) 1. In case of 24-hour clock mode (MONTHR= "1") 7
HOURR (1322H) Bit symbol Read/Write Reset State Function "0" is read. 20 hour column 10 hour column 8 hour column
6
5
HO5
4
HO4
3
HO3 R/W Undefined
2
HO2
1
HO1
0
HO0
4 hour column
2 hour column
1 hour column
0 0 0 0 0 0 0 1 1
0 0 0 0 0 1 1 0 0
0 0 0
0 0 0
0 0 1 0 0 0 0 0 1
0 1 0 0 1 0 1 0 1
0 o'clock 1 o'clock 2 o'clock 8 o'clock 9 o'clock 10 o'clock 19 o'clock 20 o'clock 23 o'clock
:
1 1 0 0 0 0
:
1 0 0 0
:
0 0 Note: Do not set data other than as shown above.
2. In case of 12-hour clock mode (MONTHR= "0") 7
HOURR (1322H) Bit symbol Read/Write Reset State Function "0" is read. PM/AM 10 hour column 8 hour column
6
5
HO5
4
HO4
3
HO3 R/W Undefined
2
HO2
1
HO1
0
HO0
4 hour column
2 hour column
1 hour column
0 0 0 0 0 0 1 1
0 0 0 0 1 1 0 0
0 0 0 1 0 0 0 0
0 0 0 : 0 0 0 0 0
0 0 1 0 0 0 0 0
0 1 0 1 0 1 0 1
0 o'clock (AM) 1 o'clock 2 o'clock 9 o'clock 10 o'clock 11 o'clock 0 o'clock (PM) 1 o'clock
Note: Do not set data other than as shown above.
92CF26A-594
2007-11-21
TMP92CF26A
(4) Day of the week column register (for PAGE0/1) 7
DAYR (1323H) Bit symbol Read/Write Reset State Function "0" is read. W2
6
5
4
3
2
WE2
1
WE1 R/W Undefined W1
0
WE0
W0
0 0 0 0 1 1 1
0 0 1 1 0 0 1
0 1 0 1 0 1 0
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
Note: Do not set data other than as shown above.
(5) Day column register (PAGE0/1) 7
DATER (1324H) Bit symbol Read/Write Reset State Function "0" is read. Day 20 Day 10 Day 8
6
5
DA5
4
DA4
3
DA3 R/W Undefined
2
DA2
1
DA1
0
DA0
Day 4
Day 2
Day 1
0 0 0 0 0 0 0 0 0 1 1 1 1
0 0 0 0 0 0 1 1 1 0 0 1 1
0 0 0 0 0
0 0 0 0 1
0 0 1 1 0 0 0 0 0 0 0 0 0
0 1 0 1 0 1 0 1 1 0 1 0 1
0 1st day 2nd day 3rd day 4th day 9th day 10th day 11th day 19th day 20th day 29th day 30th day 31st day
:
1 0 0 0 0 0
:
1 0 0 0
:
1 0 0 0 0 0
Note1: Do not set data other than as shown above. Note2: Do not set for non-existent days (e.g.: 30 Feb)
th
92CF26A-595
2007-11-21
TMP92CF26A
(6) Month column register (for PAGE0 only) 7
MONTHR Bit symbol (1325H) Read/Write Reset State Function "0" is read. 10 months 8 months
6
5
4
MO4
3
MO4
2
MO2 R/W Undefined 4 months
1
MO1
0
MO0
2 months
1 month
0 0 0 0 0 0 0 0 0 1 1 1
0 0 0 0 0 0 0 1 1 0 0 0
0 0 0 1 1 1 1 0 0 0 0 0
0 1 1 0 0 1 1 0 0 0 0 1
1 0 1 0 1 0 1 0 1 0 1 0
January February March April May June July August September October November December
Note: Do not set data other than as shown above.
(7) Select 24-hour clock or 12-hour clock (for PAGE1 only) 7
MONTHR Bit symbol (1325H) Read/Write Reset State Function "0" is read.
6
5
4
3
2
1
0
MO0 R/W Undefined 1: 24-hour 0: 12-hour
92CF26A-596
2007-11-21
TMP92CF26A
(8) Year column register (for PAGE0 only) 7
YEARR (1326H) Bit symbol Read/Write Reset State Function 80 Years 40 Years 20 Years 10 Years YE7
6
YE6
5
YE5
4
YE4 R/W Undefined
3
YE3
2
YE2
1
YE1
0
YE0
8 Years
4 Years
2 Years
1 Year
1 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 1
1 0 0 0 0 0 0 : 1
0 0 0 0 0 1 1 0
0 0 0 1 1 0 0 0
1 0 1 0 1 0 1 1
99 years 00 years 01 years 02 years 03 years 04 years 05 years 99 years
Note: Do not set data other than as shown above.
(9) Leap-year register (for PAGE1 only) 7
YEARR (1326H) Bit symbol Read/Write Reset State Function "0" is read. 00: leap-year 01: one year after leap-year 10: two years after leap-year 11: three years after leap-year
6
5
4
3
2
1
LEAP1 R/W Undefined
0
LEAP0
0 0 1 1
0 1 0 1
Current year is a leap-year Current year is the year following a leap year Current year is two years after a leap year Current year is three years after a leap year
92CF26A-597
2007-11-21
TMP92CF26A
(10)PAGE register (for PAGE0/1) 7
PAGER (1327H) Bit symbol Read/Write INTENA R/W 0 Interrupt 0: Disable 1: Enable "0" is read.
6
5
4
ADJUST W Undefined 0: Don't care 1: Adjust
3
ENATMR R/W Undefined Clock 0: Disable 1: Enable
2
ENAALM
1
0
PAGE R/W Undefined
Reset State A ReadFunction modify- write operation cannot be performed
ALARM 0: Disable 1: Enable
"0" is read.
PAGE selection
Note: Please keep the setting order below of , and . Set difference time for Clock/Alarm setting and interrupt setting. Example: Clock setting/Alarm setting ld ld (pager), 0ch (pager), 8ch : : Clock, Alarm enable Interrupt enable 0 1 0 Select Page0 Select Page1 Don't care Adjust sec. counter. When this bit is set to "1" the sec. counter becomes to "0" when the value of the sec. counter is 0-29. When the value of the sec. counter is 30-59, the min. counter is carried and sec. counter becomes "0". Output Adjust signal during 1 cycle of fSYS. After being adjusted once, Adjust is released automatically. (PAGE0 only)
PAGE
ADJUST
1
(11) Reset register (for PAGE0/1) 7
RESTR (1328H) Bit symbol Read/Write 1Hz 0: Enable 1: Disable 16Hz 0: Enable 1: Disable 1:Clock reset 1:Alarm reset Always write "0" DIS1HZ
6
DIS16HZ
5
RSTTMR
4
RSTALM W Undefined
3
-
2
-
1
-
0
-
A ReadReset State modifyFunction write operation cannot be performed
RSTALM
0 1 0 1
Unused Reset alarm register Unused Reset clock register 1 1 0 Others PAGER 1 0 0 Interrupt source signal Alarm 1Hz 16Hz Output "0"
RSTTMR
1 0 1
92CF26A-598
2007-11-21
TMP92CF26A 3.21.5 Operational description
(1) Reading clock data 1. Using 1Hz interrupt 1Hz interrupt and the count up of internal data synchronize. Therefore, data can read correctly if reading data after 1Hz interrupt occurred. 2. Using two times reading There is a possibility of incorrect clock data reading when the internal counter carries over. To ensure correct data reading, please read twice, as follows:
Start
PAGER = "0" , Select PAGE0
Read the clock data (1st)
Read the clock data (2nd)
NO 1st data = 2nd data YES END
Figure 3.21.2 Flowchart of clock data read
92CF26A-599
2007-11-21
TMP92CF26A
(2) Writing clock data When a carry over occurs during a write operation, the data cannot be written correctly. Please use the following method to ensure data is written correctly. 1. Using 1Hz interrupt 1Hz interrupt and the count up of internal data synchronize. Therefore, data can write correctly if writing data after 1Hz interrupt occurred. 2. Resets counter There are 15-stage counter inside the RTC, which generate a 1Hz clock from 32,768 KHz. The data is written after reset this counter. However, if clearing the counter, it is counted up only first writing at half of the setting time, first writing only. Therefore, if setting the clock counter correctly, after clearing the counter, set the 1Hz-interrupt to enable. And set the time after the first interrupt (occurs at 0.5Hz) is occurred.
Start PAGER = "0" , Select PAGE0
RESTR = "1" reset counter
RESTR = "0" enable 1Hz interrupt
First interrupts occur (After 0.5S) YES Sets the time
NO
END
92CF26A-600
2007-11-21
TMP92CF26A
3. Disabling the clock A clock carry over is prohibited when "0" is written to PAGER in order to prevent malfunction caused by the Carry hold circuit. While the clock is prohibited, the Carry hold circuit holds a one sec. carry signal from a divider. When the clock becomes enabled, the carry signal is output to the clock, the time is revised and operation continues. However, the clock is delayed when clock-disabled state continues for one second or more. Note that at this time system power is down while the clock is disabled. In this case the clock is stopped and clock is delayed.
Start
Disable the clock
Read the clock data
Note: This period is within 0.5 secound.
Enable the clock
End
Figure 3.21.3 Flowchart of Clock disable
92CF26A-601
2007-11-21
TMP92CF26A 3.21.6 Explanation of the interrupt signal and alarm signal
The alarm function used by setting the PAGE1 register and outputting either of the following three signals from ALARM pin by writing "1" to PAGER. INTRTC outputs a 1-shot pulse when the falling edge is detected. RTC is not initialized by RESET. Therefore, when the clock or alarm function is used, clear interrupt request flag in INTC (interrupt controller). (1) When the alarm register and the clock correspond, output "0". (2) 1Hz Output clock. (3) 16Hz Output clock. (1) When the alarm register and the clock correspond, output "0" When PAGER= "1", and the value of PAGE0 clock corresponds with PAGE1 alarm register output "0" to ALARM pin and generate INTRTC. The methods for using the alarm are as follows: Initialization of alarm is done by writing in "1" to RESTR. All alarm settings become Don't care. In this case, the alarm always corresponds with value of the clock, and if PAGER is "1", INTRTC interrupt request is generated. Setting alarm min., alarm hour, alarm date and alarm day is done by writing data to the relevant PAGE1 register. When all setting contents correspond, RTC generates an INTRTC interrupt, if PAGER is "1". However, contents which have not been set up (don't care state) are always considered to correspond. Contents which have already been set up, cannot be returned independently to the Don't care state. In this case, the alarm must be initialized and alarm register reset. The following is an example program for outputting an alarm from ALARM -pin at noon (PM12:00) every day.
LD LD LD LD LD LD LD ( LD (PAGER), 09H (RESTR), D0H (DAYR), 01H (DATAR),01H (HOURR), 12H (MINR), 00H (PAGER), 0CH (PAGER), 8CH ; ; ; ; ; ; ; ; Alarm disable, setting PAGE1 Alarm initialize W0 1 day Setting 12 o'clock Setting 00 min Set up time 31 s (Note) Alarm enable Interrupt enable )
When the CPU is operating at high frequency oscillation, it may take a maximum of one clock at 32 kHz (about 30us) for the time register setting to become valid. In the above example, it is necessary to set 31us of set up time between setting the time register and enabling the alarm register.
Note: This set up time is unnecessary when you use only internal interruption.
92CF26A-602
2007-11-21
TMP92CF26A
(2) With 1Hz output clock RTC outputs a clock of 1Hz to ALARM pin by setting up PAGER= "0", RESTR= "0", = "1". RTC also generates an INTRC interrupt on the falling edge of the clock. (3) With 16Hz output clock RTC outputs a clock of 16Hz to ALARM pin by setting up PAGER= "0", RESTR= "1", = "0". RTC also generates INTRC an interrupt on the falling edge of the clock.
92CF26A-603
2007-11-21
TMP92CF26A
3.22 Melody / Alarm generator (MLD)
The TMP92CF26A contains a melody function and alarm function, both of which are output from the MLDALM pin. Five kind of fixed cycle interrupt are generated by using a 15bit counter for use as the alarm generator. The features are as follows. 1) Melody generator The Melody function generates signals of any frequency (4Hz- 5461Hz) based on a low-speed clock (32.768 KHz) and outputs the signals from the MLDALM pin. The melody tone can easily be heard by connecting an external loud speaker. 2) Alarm generator The Alarm function generates eight kinds of alarm waveform having a modulation frequency (4096Hz) determined by the low-speed clock (32.768 KHz). This waveform can be inverted by setting a value to a register. The alarm tone can easily be heard by connecting an external loud speaker. Five kinds of fixed cycle interrupts are generated (1Hz, 2Hz, 64Hz, 512Hz, 8192Hz) by using a counter that is used for the alarm generator.
This section is constituted as follows. 3.22.1 Block diagram 3.22.2 Control registers 3.22.3 Operational Description 3.22.3.1 Melody generator 3.22.3.2 Alarm generator
92CF26A-604
2007-11-21
TMP92CF26A 3.22.1 Block Diagram
[Melody Generator] Reset Internal data bus
MELFH, MELFL register MELOUT MELFH Stop and Clear Clear Low-speed clock 12bit counter (UC0) Invert Comparator (CP0) F/F
INTALM0 (8192Hz) INTALM1 (512 Hz) Edge detectior INTALM2 (64 Hz) INTALM3 (2 Hz) INTALM4 (1 Hz) 15bit conter (UC1) 4096 Hz MELALMC 8bit counter (UC2) MELOUT Alarm wave form generator Selector Invert ALMOUT MELALMC MELALMC MLDALM pin INTALM
ALMINT
ALM register
[Alarm Generator]
Internal data bus
Reset
Figure 3.22.1MLD Block Diagram
92CF26A-605
2007-11-21
TMP92CF26A 3.22.2 Control registers
ALM register 7
ALM (1330H) bit Symbol Read/Write Reset State Function 0 0 0 0 AL8
6
AL7
5
AL6
4
AL5 R/W
3
AL4 0
2
AL3 0
1
AL2 0
0
AL1 0
Setting alarm pattern
MELALMC register 7
MELALMC bit Symbol (1331H) Read/Write Reset State Function 0 00: Hold 01: Restart 10: Clear 11: Clear & Start Note1: MELALMC is always read "0". Note2: When setting MELALMC register except while the free-run counter is running, is kept "01". 0 0 Waveform invert
1:Invert
6
FC0
5
ALMINV
4
- R/W 0
3
- 0
2
- 0
1
- 0
0
MELALM 0 Select Output Waveform 0: Alarm 1: Melody
FC1
Free-run counter control Alarm
Always write "0"
MELFL register 7
MELFL (1332H) bit Symbol Read/Write Reset State Function 0 0 0 0 ML7
6
ML6
5
ML5
4
ML4 R/W
3
ML3 0
2
ML2 0
1
ML1 0
0
ML0 0
Setting melody frequency (lower 8bit)
MELFH register 7
MELFH (1333H) bit Symbol Read/Write Reset State Function MELON R/W 0 Control melody counter 0: Stop & Clear 1: Start 0 0
6
5
4
3
ML11
2
ML10 R/W
1
ML9 0
0
ML8 0
Setting melody frequency(upper 4bit)
ALMINT register 7
ALMINT (1334H) bit Symbol Read/Write Reset State Function 0 Always write "0" 0
1:INTALM4 (1Hz) enable
6
5
-
4
IALM4E
3
IALM3E R/W 0
1:INTALM3 (2Hz) enable
2
IALM2E 0
1:INTALM2 (64Hz) enable
1
IALM1E 0
1:INTALM1 (512Hz) enable
0
IALM0E 0
1:INTALM0 (8192Hz) enable
Note: INTALM0 to INTALM4 prohibit that set to enable at same time. If setting to enable, set only 1.
92CF26A-606
2007-11-21
TMP92CF26A 3.22.3 Operational Description
Melody generator The Melody function generates signals of any frequency (4Hz-5461Hz) based on a low-speed clock (32.768KHz) and outputs the signals from the MLDALM pin. The melody tone can easily be heard by connecting an external loud speaker. (Operation) MELALMC must first be set as 1 in order to select the melody waveform to be output from MLDALM. The melody output frequency must then be set to 12-bit register MELFH, MELFL. The following are examples of settings and calculations of melody output frequency. (Formula for calculating melody waveform frequency)
@fs = 32.768 [kHz] Melody output waveform Setting value for melody fMLD[Hz] = 32768/ (2 x N + 4) N = (16384/ fMLD) - 2
3.22.3.1
(Note: N = 1~4095 (001H~FFFH), 0 is not acceptable)
(Example program)
When outputting an "A" musical note (440Hz) LD LD LD (MELALMC), --XXXXX1B (MELFL), 23H (MELFH), 80H ; Select melody waveform ; N = 16384/440 - 2 = 35.2 = 023H ; Start to generate waveform
(Refer: Basic musical scale setting table) Scale
C D E F G A B C
Frequency [Hz]
264 297 330 352 396 440 495 528
Register Value: N
03CH 035H 030H 02DH 027H 023H 01FH 01DH
92CF26A-607
2007-11-21
TMP92CF26A
3.22.3.2 Alarm generator
The Alarm function generates eight kinds of alarm waveform having a modulation frequency of 4096Hz determined by the low-speed clock (32.768 KHz). This waveform is reversible by setting a value to a register. The alarm tone can easily be heard by connecting an external loud speaker. Five kind of fixed cycle (interrupts can be generated 1Hz, 2Hz, 64Hz, 512Hz, 8192Hz) by using a counter which is used for the alarm generator. (Operation) MELALMC must first be set as 0 in order to select the alarm waveform to be output from MLDALMC. The "10" must be set on the MELALMC register, and clear internal counter. Finally the alarm pattern must then be set on the 8-bit register of ALM. If it is inverted output-data, set as invert. The following are examples of program, setting value of alarm pattern and waveform of each setting value.
(Setting value of alarm pattern) Setting value for ALM register
00H 01H 02H 04H 08H 10H 20H 40H 80H Other
Alarm waveform
"0" fixed AL1 pattern AL2 pattern AL3 pattern AL4 pattern AL5 pattern AL6pattern AL7 pattern AL8 pattern Undefined (Do not set)
(Example program)
When outputting AL2 pattern (31.25ms/8 times/1sec) LD LD (MELALMC), C0H (ALM), 02H ; Set output alarm waveform ; Free-run counter start ; Set AL2 pattern, start
92CF26A-608
2007-11-21
TMP92CF26A
Example: Waveform of alarm pattern for each setting value: not inverted)
AL1 pattern (Continuous output) 1 AL2 pattern (8 times/1 sec) 31.25 ms 1 AL3 pattern (once) 500 ms 1 AL4 pattern (Twice/1 sec) 62.5 ms 1 AL5 pattern (3 times/1 sec) 62.5 ms 1 1 sec 2 3 1 sec 1 2 1 1 sec 2
Modulation frequency (4096 Hz) 8 1
AL6 pattern (1 times)
62.5 ms AL7 pattern (Twice) 1 2
62.5 ms AL8 pattern (Once) 250 ms
92CF26A-609
2007-11-21
TMP92CF26A
3.23 Analog-Digital Converter (ADC)
A 10-bit serial conversion analog/digital converter (AD converter) having six channels of analog input is built in. Figure 3.23.1 shows the block diagram of the AD converter. The 6-analog input channels (AN0-AN5) can be used as general-purpose inputs.
Note1: To reduce the power supply current by IDLE2, IDLE1, STOP or PCM mode, the standby state may be maintained with the internal comparator still being enabled, depending on the timing. Check that the AD converter operation is in a stop before executing HALT instruction. In IDLE2 mode it operates only the case of ADMOD0= "0". Note2: Setting ADMOD1 = "0" while the AD converter is in a stop can reduce current consumption.
Internal data bus
ADS ADMOD0 ITM/LAT
ADMOD1
ADMOD2
ADMOD3
ADMOD4/5
HTSEL/HHTRGE TSEL/HTRGE Scan AD Monitor Function control
Channel selection control circuit End Busy
repeat
AD Monitor function interrupt INTADM
Start
AD start control End Busy Start ADTRG High-Priority AD Converter Control TRMB/ I2S Complete interrupt AD INTADHP Normal AD Conversion complete interrupt INTAD
Normal AD Converter Control Circuit AN5 (PG5) Multiplexer AN4 (PG4)
ADTRG
, AN3 (PG3) AN2 (PG2) AN1 (PG1) AN0 (PG0)
Sample Hold
Compare register
+ -
Comparator
Compare circuit 1&2 A / D Conversion Result Register ADREG0L~5L ADREG0H~5H
High-Priority AD Conversion Result Register ADREGSPH/L
VREF VREFH VREFL D/A Converter
Figure 3.23.1 ADC Block Diagram
92CF26A-610
2007-11-21
Internal data bus
TMP92CF26A 3.23.1 Control register
The AD converter is controlled by the AD mode control registers (ADMOD0, ADMOD1, ADMOD2, ADMOD3, ADMOD4 and ADMOD5). AD conversion results are stored in the six registers of AD conversion result higher-order/lower-order registers ADREG0H/L to ADREG5H/L. Top-priority conversion results are stored in ADREGSPH/L. Figure 3.23.2 to Figure 3.23.11 show the registers available in the AD converter. AD Mode Control Register 0 (Normal conversion control) 7
ADMOD0 (12B8H) bit Symbol Read/Write Reset State Function 0 EOS R 0 0 0
Normal AD Normal AD conversion conversion end flag BUSY Flag 0:During 0:Stop conversion conversion sequence 1:During or before conversion starting 1:Complete conversion sequence Start Normal AD conversion AD conversion when 0: Don't Care IDLE2 1:Start AD mode conversion 0: Stop 1: Operate Always read as"0".
6
BUSY
5
4
I2AD
3
ADS
2
HTRGE R/W 0
Normal AD conversion at Hard ware trigger 0: Disable 1: Enable
1
TSEL1 0
0
TSEL0 0
Select Hard ware trigger 00: INTTB00 interrupt 01: Reserved 10: ADTRG 11: Reserved
Figure 3.23.2 AD Conversion Registers
92CF26A-611
2007-11-21
TMP92CF26A
AD Mode Control Register 1 (Normal conversion control) 7
ADMOD1 (12B9H) bit Symbol Read/Write Reset State Function 0
DAC and VREF application control
6
ADCH2 0
5
ADCH1 0
4
ADCH0 0 R/W
3
LAT 0
Latency 0: No Wait 1:Start after reading conversion result store Register of last channel
2
ITM 0
1
REPEAT 0
0
SCAN 0
Scan mode specification 0: Channel-fix mode 1: Channel scan mode
DACON
Analog input channel select
Repeat Interrupt specification mode specification when 0:Single conversion conversion channel-fix repeat mode 1:Repeat conversion
Specify AD conversion interrupt for Channel Fixed Repeat Conversion mode Channel Fixed Repeat Conversion Mode = "0", = "1" 0 Generates interrupt every conversion 1 Generated interrupt every fourth conversion Next SCAN start timing control for the channel-scan repeat mode Channel Scan Repeat mode ( = 1, = 1) 0 No Wait 1 Start after read last of conversion result store Register Analog input channel select 0: Channel -fix 000 AN0 001 AN1 010 AN2 011 AN3(note) 100 AN4 101 AN5 110 Reserved 111 Reserved
1: Channel-scan
AN0 AN0AN1 AN0AN1AN2 AN0AN1AN2AN3 (note) AN0AN1AN2AN3AN4 (note) AN0AN1AN2AN3AN4AN5 (note)
Note: When using PG3 pin as ADTRG , it cannot be set. DAC & VREF application control 0 DAC & VREF off (Set before into STOP mode) 1 DAC & VREF on (Set to "1" before starting conversion)
Figure 3.23.3 AD Converter Related Register
92CF26A-612
2007-11-21
TMP92CF26A
AD Mode Control Register 2 (Top-priority conversion control) 7
ADMOD2 bit Symbol (12BAH) Read/Write Reset State Function 0 HEOS R 0 0
Start Top-priority AD conversion 0: Don't Care 1: Start AD conversion Always read as"0". Top-priority Top-priority AD AD conversion conversion BUSY Flag sequence FLAG 0:Stop 0: During conversion conversion sequence 1:During conversion or before starting 1: Complete conversion sequence
6
HBUSY
5
4
3
HADS
2
HHTRGE R/W 0
Top-priority AD conversion at Hard ware trigger 0: Disable 1: Enable
1
HTSEL1 0
0
HTSEL0 0
Select Hard ware trigger 00: INTTB10 interrupt 01: Reserved 10: ADTRG 11: I2S Sampling Counter Output
AD Mode Control Register 3 (Top-priority conversion control) 7
ADMOD3 bit Symbol (12BBH) Read/Write Reset State Function 0 Always write "0". 0 select -
6
HADCH2 R/W
5
HADCH1 0
4
HADCH0 0
3
2
1
0
- R/W 0 Always write "0".
Top-priority analog input channel
Analog input channel select
Analog input channel when High-priority conversion
000 001 010 011 100 101 110 111
AN0 AN1 AN2 AN3(note) AN4 AN5 Reserved Reserved
Note: When using PG3 pin as ADTRG , it cannot be set.
Figure 3.23.4 AD Conversion Registers
92CF26A-613
2007-11-21
TMP92CF26A
AD Mode Control Register 4 (AD Monitor function control) 7
ADMOD4 bit Symbol (12BCH) Read/Write Reset State Function 0
AD Monitor function1 0: Disable 1: Enable
6
CMEN0 0
AD Monitor function0 0: Disable 1: Enable
5
CMP1C R/W 0
Generation condition of AD monitor function interrupt 1 0: less than 1: Greater than or Equal
4
CMP0C 0
Generation condition of AD monitor function interrupt 0 0: less than 1: Greater than or Equal
3
IRQEN1 0
AD monitor function interrupt 1 0: Disable 1: Enable (Note)
2
IRQEN0 0
AD monitor function interrupt 0 0: Disable 1: Enable (Note)
1
CMPINT1 R 0
Status of AD monitor function interrupt 1 0: No generation 1: Generation
0
CMPINT0 0
Status of AD monitor function interrupt 0 0: No generation 1: Generation
CMEN1
Note: When AD monitor function interrupts generate, it is cleared automatically and it is set to disable condition.
AD Mode Control Register 5 (AD Monitor function control) 7
ADMOD5 (12BDH) bit Symbol Read/Write Reset State Function 0
6
CMCH2
5
CM1CH1 R/W 0
4
CM1CH0 0
3
2
CM0CH2 0
1
CM0CH1 R/W 0
0
CM0CH0 0
Select analog channel for AD monitor function 1 000: AIN0 100: AN4 001: AIN1 101: AN5 010: AIN2 110: Reserved 011: AN3 111: Reserved
Select analog channel for AD monitor function 0 000: AIN0 100: AN4 001: AIN1 101: AN5 010: AIN2 110: Reserved 011: AN3 111: Reserved
Note1: When converting AD in hard ware trigger by setting and to "1", set PGFC to "1" (as ADTRG) in case of external TRG before enabling it. When using an INTTBx0 of 16-bit timer, first set the or bit to "00" when the timer is not operating. Then, set the and to "1" and enable trigger operation. Finally, operate the timer so that AD conversion will be initiated at constant intervals. Note 2: When disabling an external trigger ( ADTRG ) for AD conversion, first clear the or bit to "0", and clear the PGFC to "0", thus configuring port G as a general-purpose port. Note 3: When starting AD by using external trigger (ADTRG), it can be started after enabling ( = "1" or = "1") and 3 clock at fSYS was executed. AD is not started when before that time. Note 4: When chaging compare register value of AD Monitor function, change it after setting AD Monitor function to disable(ADMOD4 = "0").
Figure 3.23.5 AD Conversion Registers
92CF26A-614
2007-11-21
TMP92CF26A
AD Conversion Result Register 0 Low 7
ADREG0L bit Symbol (12A0H) Read/Write Reset State Function 0 ADR01 R 0 0
Overrun flag 0:No generate 1: Generate
6
ADR00
5
4
3
2
1
OVR0 R
0
ADR0RF 0
AD conversion result store flag 1: Stored
Store Lower 2 bits of AN0 AD conversion result
AD Conversion Result Register 0 High 7
ADREG0H bit Symbol (12A1H) Read/Write Reset State Function 0 0 0 0 ADR09
6
ADR08
5
ADR07
4
ADR06 R
3
ADR05 0
2
ADR04 0
1
ADR03 0
0
ADR02 0
Store Upper 8 bits of AN0 AD conversion result
AD Conversion Result Register 1 Low 7
ADREG1L (12A2H) bit Symbol Read/Write Reset State Function 0 ADR11 R 0 0
Overrun flag 0:No generate 1: Generate
6
ADR10
5
4
3
2
1
OVR1 R
0
ADR1RF 0
AD conversion result store flag 1: Stored
Store Lower 2 bits of AN1 AD conversion result
AD Conversion Result Register 1 High 7
ADREG1H bit Symbol (12A3H) Read/Write Reset State Function 9 Channel X conversion result ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2 ADREGxL 1 0 8 0 0 0 0 ADR19
6
ADR18
5
ADR17
4
ADR16 R
3
ADR15 0
2
ADR14 0
1
ADR13 0
0
ADR12 0
Store Upper 8 bits of AN1 AD conversion result 7 6 5 4 3 2 1 0
* * *
Bits 5 2 are always read as "0". Bit 0 is the AD conversion result store flag . When AD conversion result is stored, the flag is set to "1". When Lower register (ADRECxL) is read, this bit is cleared to "0". Bit 1 is the Overrun flag . This bit is set to "1" if a next conversion result is written to the ADREGxH/L before both the ADREGxH and ADREGxL are read. This bit is cleared to "0" by reading Flag.
Figure 3.23.6 AD Conversion Registers
92CF26A-615
2007-11-21
TMP92CF26A
AD Conversion Result Register 2 Low 7
ADREG2L (12A4H) bit Symbol Read/Write Reset State Function 0 ADR21 R 0 0
Overrun flag 0:No generate 1: Generate
6
ADR20
5
4
3
2
1
OVR2 R
0
ADR2RF 0
AD conversion result store flag 1: Stored
Store Lower 2 bits of AN2 AD conversion result
AD Conversion Result Register 1 High 7
ADREG2H bit Symbol (12A5H) Read/Write Reset State Function 0 0 0 0 ADR29
6
ADR28
5
ADR27
4
ADR26 R
3
ADR25 0
2
ADR24 0
1
ADR23 0
0
ADR22 0
Store Upper 8 bits of AN2 AD conversion result
AD Conversion Result Register 3 Low 7
ADREG3L (12A6H) bit Symbol Read/Write Reset State Function 0 ADR31 R 0 0
Overrun flag 0:No generate 1: Generate
6
ADR30
5
4
3
2
1
OVR3 R
0
ADR3RF 0
AD conversion result store flag 1: Stored
Store Lower 2 bits of AN3 AD conversion result
AD Conversion Result Register 3 High 7
ADREG3H (12A7H) bit Symbol Read/Write Reset State Function 9 Channel X conversion result ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2 ADREGxL 1 0 8 0 0 0 0 ADR39
6
ADR38
5
ADR37
4
ADR36 R
3
ADR35 0
2
ADR34 0
1
ADR33 0
0
ADR32 0
Store Upper 8 bits of AN3 AD conversion result 7 6 5 4 3 2 1 0
* * *
Bits 5 2 are always read as "0". Bit 0 is the AD conversion result store flag . When AD conversion result is stored, the flag is set to "1". When Lower register (ADRECxL) is read, this bit is cleared to "0". Bit 1 is the Overrun flag . This bit is set to "1" if a next conversion result is written to the ADREGxH/L before both the ADREGxH and ADREGxL are read. This bit is cleared to "0" by reading Flag.
Figure 3.23.7 AD Conversion Registers
92CF26A-616
2007-11-21
TMP92CF26A
AD Conversion Result Register 4 Low 7
ADREG4L bit Symbol (12A8H) Read/Write Reset State Function 0 ADR41 R 0 0
Overrun flag 0:No generate 1: Generate
6
ADR40
5
4
3
2
1
OVR4 R
0
ADR4RF 0
AD conversion result store flag 1: Stored
Store Lower 2 bits of AN4 AD conversion result
AD Conversion Result Register 4 High 7
ADREG4H bit Symbol (12A9H) Read/Write Reset State Function 0 0 0 0 ADR49
6
ADR48
5
ADR47
4
ADR46 R
3
ADR45 0
2
ADR44 0
1
ADR43 0
0
ADR42 0
Store Upper 8 bits of AN4 AD conversion result
AD Conversion Result Register 5 Low 7
ADREG5L (12AAH) bit Symbol Read/Write Reset State Function 0 ADR51 R 0 0
Overrun flag 0:No generate 1: Generate
6
ADR50
5
4
3
2
1
OVR5 R
0
ADR5RF 0
AD conversion result store flag 1: Stored
Store Lower 2 bits of AN5 AD conversion result
AD Conversion Result Register 5 High 7
ADREG5H (12ABH) bit Symbol Read/Write Reset State Function 9 Channel X conversion result ADREGxH 765 ADREGxL 10 8 0 0 0 0 ADR59
6
ADR58
5
ADR57
4
ADR56 R
3
ADR55 0
2
ADR54 0
1
ADR53 0
0
ADR52 0
Store Upper 8 bits of AN5 AD conversion result 7 6 5 4 3 2 1 0
4
3
2
1
0
7
6
5
4
3
2
* * *
Bits 5 2 are always read as "0". Bit 0 is the AD conversion result store flag . When AD conversion result is stored, the flag is set to "1". When Lower register (ADRECxL) is read, this bit is cleared to "0". Bit 1 is the Overrun flag . This bit is set to "1" if a next conversion result is written to the ADREGxH/L before both the ADREGxH and ADREGxL are read. This bit is cleared to "0" by reading Flag.
Figure 3.23.8 AD Conversion Registers
92CF26A-617
2007-11-21
TMP92CF26A
Top-priority AD Conversion Result Register SP Low 7
ADREGSPL (12B0H) bit Symbol Read/Write Reset State Function 0 ADRSP1 R 0 0
Overrun flag 0:No generate 1: Generate
6
ADRSP0
5
4
3
2
1
OVSRP R
0
ADRSPRF 0
AD conversion result store flag 1: Stored
Store Lower 2 bits of an AD conversion result
Top-priority AD Conversion Result Register SP High 7
ADREGSPH bit Symbol (12B1H) Read/Write Reset State Function 9 Channel X conversion result ADREGxH 7 6 5 4 3 2 1 0 7 6 5 4 3 2 ADREGxL 1 0 8 0 0 0 0 ADRSP9
6
ADRSP8
5
ADRSP7
4
ADRSP6 R
3
ADRSP5 0
2
ADRSP4 0
1
ADRSP3 0
0
ADRSP2 0
Store Upper 8 bits of an AD conversion result 7 6 5 4 3 2 1 0
* * *
Bits 5 2 are always read as "0". Bit 0 is the AD conversion result store flag . When AD conversion result is stored, the flag is set to "1". When Lower register (ADRECxL) is read, this bit is cleared to "0". Bit 1 is the Overrun flag . This bit is set to "1" if a next conversion result is written to the ADREGxH/L before both the ADREGxH and ADREGxL are read. This bit is cleared to "0" by reading Flag.
Figure 3.23.9 AD Conversion Registers
92CF26A-618
2007-11-21
TMP92CF26A
AD Conversion Result Compare Criterion Register 0 Low 7
ADCM0REGL bit Symbol (12B4H) Read/Write Reset State Function 0 ADR21 R/W 0 Store Lower 2 bits of an AD conversion result compare criterion
6
ADR20
5
4
3
2
1
0
AD Conversion Result Compare Criterion Register 0 High 7
ADCM0REGH bit Symbol (12B5H) Read/Write Reset State Function 0 0 0 0 ADR29
6
ADR28
5
ADR27
4
ADR26 R/W
3
ADR25 0
2
ADR24 0
1
ADR23 0
0
ADR22 0
Store Upper 8 bits of an AD conversion result compare criterion
AD Conversion Result Compare Criterion Register 1 Low 7
ADCM1REGL bit Symbol (12B6H) Read/Write Reset State Function 0 ADR21 R/W 0 Store Lower 2 bits of an AD conversion result compare criterion
6
ADR20
5
4
3
2
1
0
AD Conversion Result Compare Criterion Register 1 High 7
ADCM1REGH bit Symbol (12B7H) Read/Write Reset State Function 0 0 0 0 ADR29
6
ADR28
5
ADR27
4
ADR26 R/W
3
ADR25 0
2
ADR24 0
1
ADR23 0
0
ADR22 0
Store Upper 8 bits of an AD conversion result compare criterion
Note: Disable the AD monitor function (ADMOD4 = "0") before attempting to set or modify the value of these registers.
Figure 3.23.10 AD Conversion Registers
92CF26A-619
2007-11-21
TMP92CF26A
AD Conversion Clock Setting Register 7
ADCCLK (12BFH) bit Symbol Read/Write Reset State Function 0 Always write "0"
6
5
4
3
-
2
ADCLK2 R/W
1
ADCLK1
0
ADCLK0
0 0 0 Select clock for AD conversion 000 : Reserved 001 : fIO/1 010 : fIO/2 011 : fIO/3 100 : fIO/4 101 : fIO/5 110 : fIO/6 111 : fIO/7
Note1: AD conversion is executed at the clock frequency selected in the above register. To assure conversion accuracy, however, the conversion clock frequency must not exceed 12MHz MHz. Note2: Don `t change the clock frequency while AD conversion is in progress.
Figure 3.23.11 AD Conversion Registers
/1 /7
fSYS
ADCLK
fIO(fSYS/2)
40MHz

100(fIO/4) 101(fIO/5)
ADCLK
10.0MHZ 8MHZ 10.0MHZ 7.5MHZ
AD conversion speed
12 sec 15 sec 12 sec 16 sec
30MHz
011(fIO/3) 100(fIO/4)
AD conversion speed can be calculated by following. Conversion speed = 120 x (1/ADCLK)
92CF26A-620
2007-11-21
TMP92CF26A 3.23.2 Operation
Apply the analog reference voltage's "H" level side to the VREFH pin and the "L" level side to the VREFL pin. 3.23.2.2 Selecting Analog Input Channels Selecting an analog input channel depends on the operation mode of the AC converter. (1) For normal AD conversion When using an analog input channel in fix mode, select one channel from the AN0 to AN5 pins by setting (ADMOD1 = "0") ADMOD1. When using an analog input channel in scan mode, select one scan mode from the six scan modes by setting (ADMOD1 = "1") ADMOD1 . (2) For top-priority AD conversion Select one channel from the analog input pins AN0 to AN5 by setting ADMOD3. After reset, ADMOD1 is initialized to "0" and ADMOD1 to "000". Since these settings are used for channel selection, the channel fixed input with the AN0 pin will be selected. Pins not used as analog input channels can be used as normal ports.
3.23.2.1 Analog Reference Voltages
92CF26A-621
2007-11-21
TMP92CF26A
3.23.2.3 Starting an AD Conversion The AD conversion has the two types of normal AD conversion and top-priority AD conversion. Normal AD conversion can be started up by setting ADMOD0 to "1." Top-priority AD conversion can be started up by software by setting ADMOD2 to "1." For normal AD conversion, one operation mode is selected from the four types of operation modes specified by ADMOD1. The operation mode for top-priority AD conversion is only single conversion by channel-fix mode. The ADC supports two types of AD conversion: normal AD conversion and Top-priority AD conversion. The ADC initiates a normal AD conversion by software when the ADMOD0 is set to "1". It initiates a Top-priority AD conversion by software when the ADMOD2 is set to "1". For a normal AD conversion, ADMOD1 select one of four conversion modes. For a Top-priority AD conversion, the ADC only supports Fixed-Channel Single Conversion mode. The ADMOD0 and ADMOD2 enable a hardware trigger for a normal and Top-priority AD conversion, respectively. When these bits are set to "10", a normal or Top-priority AD conversion is triggered by a falling edge applied to ADTRG pin. When ADMOD0 is set to "00", a normal AD conversion is triggered by INTTB00 of 16-Bit Timer interrupt. When ADMOD2 is set to "00", a Top-priority AD conversion is triggered by INTTB10 of 16-Bit Timer interrupt. If this bit is "11", it is triggered by I2S sampling block. Even when a hardware trigger is enabled, software starting can be used.
Note: If changing HTSEL at HHTRGE is "ON", maybe unexpected interrupts occurs. If changing HTSEL, once set HHTRGE to "OFF".
When normal AD conversion is started, the AD conversion BUSY flag (ADMOD0) that shows the state for AD being converted is set to "1." When top-priority AD conversion is started, the AD conversion BUSY flag (ADMOD2) that shows the state for AD being converted is set to "1." In addition, when top-priority conversion is started during normal AD conversion, ADMOD0 is kept to "1."
92CF26A-622
2007-11-21
TMP92CF26A
and are set to "1" after conversion is completed. This flag is cleared to "0" only when read. During a normal AD conversion, writing a "1" to ADMOD0 causes the ADC to abort any ongoing conversion immediately, and restart. During a normal AD conversion, if normal AD conversion starting is enabled by hard ware trigger, normal AD conversion is restarted when start condition from hard ware trigger is satisfied. When restart is set, normal AD conversion is aborted immediately. During a normal AD conversion, if a Top-priority AD conversion starts (writing a "1" to ADMOD2 or a hard ware trigger occurs), the ADC aborts any ongoing conversion immediately, and then start a Top-priority AD conversion for the channel specified by ADMOD3. Upon the completion of the Top-priority conversion, the ADC stores the conversion result to ADREGSPH/L, and then resumes the suspended normal conversion with that channel.
Note: It cannot overlap with three or more AD conversions. Prohibition example 1: In FIRST normal AD conversion (Before finished FIRST normal AD conversion) Started SECOND normal AD conversion (Before finished SECOND normal AD conversion) Started THIRD normal AD conversion Prohibition example 2: In FIRST normal AD conversion (Before finished FIRST normal AD conversion) Started SECOND normal AD conversion (Before finished SECOND normal AD conversion) Started THIRD high-priority AD conversion
92CF26A-623
2007-11-21
TMP92CF26A
3.23.2.4 AD Conversion Modes and AD Conversion-End Interrupts For AD conversion, the following four operation modes are provided: For normal AD conversion, selection is available by setting ADMOD1. As for top-priority AD conversion, only single conversion mode by channel-fix mode is available. a. Channel-fix single conversion mode b. Channel-scan single conversion mode c. Channel-fix repeat conversion mode d. Channel-scan repeat conversion mode (1) Normal AD conversion To select operation modes, use ADMOD1. After AD conversion is started, ADMOD0 is set to "1." When a specified AD conversion ends, the Normal AD conversion end interrupt (INTAD) is generated, which sets "1" in ADMOD0 is set "1", that shows the end of the AD conversion sequence. a. Channel-fix single conversion mode Setting ADMOD1 to "00" selects the channel-fix single conversion mode. This mode performs a conversion only one time at one channel selected. After conversion ends, ADMOD0 is set to "1," generating Normal AD conversion End an INTAD interrupt request. is cleared to "0" only by being read. b. Channel-scan single conversion mode Setting ADMOD1 to "01" selects the channel-scan single conversion mode. This mode performs a conversion only one time at each scan channel selected. After scan conversion ends, ADMOD0 is set to "1," generating Normal AD conversion End interrupt request. is cleared to "0" only by being read. c. Channel-fix repeat conversion mode Setting ADMOD1 to "10" selects the channel-fix repeat conversion mode. This mode performs a conversion at one channel selected repeatedly. After conversion ends, ADMOD0 is set to "1." The timing of Normal AD conversion End INTAD interrupt request generation can be selected by setting ADMOD1 . The timing of being set is also liked to the interrupt timing. ADMOD0 is cleared to "0" only by being read. Setting to "0" generates an interrupt request each time an AD conversion ends. In this case, conversion results are always stored into the storage register of ADREGxH/L. At the point of storage, is set to 1. Setting to "1" generates an interrupt request each time four AD conversions end. In this case, conversion results are stored into the storage registers of ADREG0H/L to ADREG3H/L one after another. After stored into ADREG3, is set to "1," restarting storage from ADREG0. ADMOD0 is set to "1" after a forth conversion result is stored. is cleared to "0" only by being read.
92CF26A-624
2007-11-21
TMP92CF26A
d. Channel-scan repeat conversion mode Setting ADMOD1 to "11" selects the channel-scan repeat conversion mode. This mode performs a conversion at selected scan channels repeatedly. Each time after the conversion at a final channel ends, ADMOD0 is set to "1," generating Normal AD conversion End interrupt request. is cleared to "0" only by being read. To stop the repeat conversion mode (mode of c and d) operation, write "0" in ADMOD1. At the point when a scan conversion being executed ends, the repeat conversion mode ends. Shift to a standby mode (IDLE2 Mode with ADMOD0 = "0", IDLE1 Mode or STOP Mode) immediately stops operation of the AD converter even if AD conversion is still in progress. Therefore, ADC may consume current even if operation is stopped, depending on stop condition of ADC that switches to standby mode. For avoiding this problem, Stop ADC before switching to standby mode.
(2)
Top-priority AD conversion The operation mode is only single conversion by channel-fix mode. The settings in ADMOD1 are not involved. When startup conditions are established, a conversion at a channel specified by ADMOD3 is performed only one time. When conversion ends, the top-priority AD conversion end interrupt (INTADHP) is generated, which sets "1" in ADMOD2. The HEOS flag is cleared to "0" only by being read.
Table 3.23.1 Interrupt Generation Timing and Flag Setting in Each AD Conversion Mode Conversion mode
Channel-fix Single conversion Channel-fix Repeat conversion
Interrupt Generation Timing
After conversion end Per one conversion Per four conversions
EOS set timing (Note)
After conversion end Each time after one conversion ends Each time after four conversions end After scan conversion end Each time after one scan conversion ends
ADMOD1 ITM
-
REPEAT
0
SCAN
0
0 1 1 0
Channel-scan Single conversion Channel-scan Repeat conversion
After scan conversion end Each time after one scan conversion ends
-
0
1
-
1
1
Note: EOS is cleared to "0" by reading this bit only.
92CF26A-625
2007-11-21
TMP92CF26A
3.23.2.5 Top-Priority Conversion Mode The ADC can perform a Top-priority AD conversion while it is performing a normal AD conversion sequence. A Top-priority AD conversion can be started at software by setting the ADMOD2 to "1". It is also triggered by a hardware trigger if so enabled using ADMOD2. If a Top-priority AD conversion is triggered during a normal AD conversion, the ADC aborts any ongoing conversion immediately, and then begins a single Top-priority AD conversion for the channel specified with the ADMOD3. Upon the completion of the Top-priority AD conversion, the ADC stores the results of the conversion in the ADREGSPH/L, generates the Top-priority AD conversion interrupt (INTADHP), and then resumes the suspended normal conversion with that channel. While a Top-priority conversion is being performed, a trigger for another Top-priority conversion is ignored.
Example: When AN5 top-priority AD conversion is started up with ADMOD3 = "101" during repeat scan conversion at channels AN0 to AN3 with ADMOD1 = "11" and ADMOD1 = "011"
Top-priority AD conversion start trigger Conversion channel
AN0
AN1
AN2
AN5
AN2
AN3
AN0
AN2 conversion canceled
AN2 re-conversion started
AN5 conversion started
3.23.2.6 AD Monitor Function Setting ADMOD4 to 1 enables the AD monitoring function. The value of Result storage register that is appointed by ADMOD5 is compared with the value of AD conversion result register (H/L), ADMOD4 can select greater or smaller of comparison format. As register ADMOD4 is Enable, This comparison operation is performed each time when a result is stored in the corresponding conversion result storage register. When conditions are met, the interrupt is generated. Be careful that the storage registers assigned for the AD monitoring function are usually not ready by software, which means that the overrun flag is always set and the conversion result storage flag is also set. If each of them is assigned to separate channels, the monitoring of greater or smaller is possible in the two analog channels. In addition, if assigned to the same channels, the monitoring with the voltage range set is possible. 3.23.2.7 AD Conversion Time One AD conversion takes 120 clocks including sampling clocks. The AD conversion clock is selected from 1/1 to 1/7 fIO by ADCLK . To meet the guaranteed accuracy, the AD conversion clock needs to be set to 12 MHz or less; or equivalently 10 s or more of AD conversion time.
92CF26A-626
2007-11-21
TMP92CF26A
3.23.2.8 Storing and Read of AD Conversion Results AD conversion results are stored in the AD conversion result higher-order/lower-order registers (ADREG0H/L ADRG5H/L) for the normal AD conversion (ADREG0H/L to ADREG5H/L are read-only registers) In the channel-fix repeat conversion mode, AD conversion results are stored into ADREG0H/L to ADREG3H/L one after another. In other modes, the conversion results of channels AN0, AN1, AN2, AN3, AN4, and AN5 are each stored into ADREG0H/L, ADREG1H/L, ADREG2H/L, ADREG3H/L, ADREG4H/L, and ADREG5H/L. Table 3.23.2 shows the correspondence between analog input channels and AD conversion result registers.
Table 3.23.2 Correspondence between analog input channels and AD conversion result registers AD Conversion result registers Analog input channel (Port G)
AN0 AN1 AN2 AN3 AN4 AN5
Other conversion modes than shown in the right
ADREG0H/L ADREG1H/L ADREG2H/L ADREG3H/L ADREG4H/L ADREG5H/L
Channel-fix repeat conversion mode (per 4 times)
ADREG0H/L ADREG1H/L ADREG2H/L ADREG3H/L
Note: In order to detect overruns without omission, read the conversion result storage register's higher-order bits first, and than read the lower-order bits next. As this result, receiving the result of OVRn = "0" and ADRnRF = "1" for overruns existing in the lower-order bits means that a correct conversion result has been obtained.
3.23.2.9 Data Polling To process AD conversion results by using data polling without using interrupts, perform a polling on ADMOD0. After confirming that ADMOD0 is set to "1," read the AD conversion storage register.
92CF26A-627
2007-11-21
TMP92CF26A
Setting example: 1. Convert the analog input voltage on the AN3 pin and write the result to memory address 2800H using the AD interrupt(INTAD) processing routine. 7 INTEAD ADMOD1 ADMOD0 WA WA (2800H) 2. 1 1 6 1 1 X 5 0 0 0 4 0 0 0 3 - 0 0 2 - 0 0 1 - 1 0 0 - 1 1 Enable INTAD and set it to interrupt level 4. Set pin AN3 to be the analog input channel. Start conversion in channel-fix single conversion mode. Read value of ADREG3L and ADREG3H into 16-bits general-purpose register WA. Shift contents read into WA six times to right and zero fill upper bits. Write contents of WA to memory address 2800H.
Main routine
X
Interrupt routine processing example ADREG3 >>6 WA
This example repeatedly converts the analog input voltages on the three pins AN0, AN1 and AN2, using channel-scan repeat conversion mode. 1 1 0 1 X 0 0 0 0 0 0 - 0 0 - 0 1 - 1 1 - 0 1 Disable INTAD. Set pins AN0 to AN2 to be the analog input channels. Start conversion in channel-scan repeat conversion mode.
INTEAD ADMOD1 ADMOD0
X
3. Convert the analog input voltage on the AN2 pin as a Top-priority AD conversion, and write the result to memory address 2A00H using the Top-priority AD interrupt (INTADHP) processing routine. Main routine INTEAD ADMOD1 ADMOD3 ADMOD2 WA WA (2A00H) 1 1 0 0 1 0 0 0 0 0 1 0 1 0 0 0 - 0 0 1 - 0 0 0 - 0 0 0 - 0 0 0 Enable INTADHP and set it to interrupt level 6. DAC On. Set pin AN2 to be the analog input channel. Start a Top-priority AD conversion by software. Read value of ADREGSPL and ADREGSPH into 16-bits general-purpose register WA. Shift contents read into WA six times to right and zero fill upper bits. Write contents of WA to memory address 2A00H.
Interrupt routine processing example ADREGSP >>6 WA
4. Convert the analog input voltage on the AN4 pin as a normal AD conversion of a channel-fix single conversion mode. And then if its conversion result is greater or equal than the value of (ADCM0REGL/H), write the result to memory address 2C00H using the AD monitor function interrupt (INTADM) processing routine. Main routine INTEAD ADMOD5 ADMOD4 - 0 0 - 0 0 - 0 1 - 0 0 1 1 0 0 0 0 1 0 0 1 0 0 Enable INTAD and set it to interrupt level 3. Set the analog input channel AN4 for AD monitor function 0. Enable the AD monitor function0 and AD monitor function interrupt 0. Set "a conversion result AD conversion result compare criterion register" for generation condition of monitor function interrupt 0. Set pin AN4 to be the analog input channel. Start a normal AD conversion by software. Read value of ADREG4L and ADREG4H into 16-bits general-purpose register WA. Shift contents read into WA six times to right and zero fill upper bits. Write contents of WA to memory address 2C00H.
ADMOD1 ADMOD0 WA WA (2C00H)

1 0
0 0
1 0
0 0
0 1
0 0
0 0
0 0
Interrupt routine processing example ADREG4 >>6 WA
X : Don't care, - : No change
92CF26A-628
2007-11-21
TMP92CF26A
3.24 Watchdog Timer (Runaway detection timer)
The TMP92CF26A contains a watchdog timer of runaway detecting. The watchdog timer (WDT) is used to return the CPU to the normal state when it detects that the CPU has started to malfunction (runaway) due to causes such as noise. When the watchdog timer detects a malfunction, it generates a non-maskable interrupt INTWD to notify the CPU of the malfunction. Connecting the watchdog timer output to the reset pin internally forces a reset. (The level of external RESET pin is not changed.)
3.24.1
Configuration
Figure 3.24.1 is a block diagram of the watchdog timer (WDT).
WDMOD
RESET pin
Reset control
Internal reset
INTWD interrupt
WDMOD 2 fIO
15
Selector 2
17
2
19
2
21
Binary counter (22 stages) Reset
Q R S
Internal reset Write 4EH Write B1H WDMOD
WDT control register WDCR
Internal data bus
Figure 3.24.1 Block Diagram of Watchdog Timer
Note: Care must be exercised in the overall design of the apparatus since the watchdog timer may fail to function correctly due to external noise, etc.
92CF26A-629
2007-11-21
TMP92CF26A 3.24.2 Operation
The watchdog timer generates an INTWD interrupt when the detection time set in the WDMOD has elapsed. The watchdog timer must be cleared "0" in software before an INTWD interrupt will be generated. If the CPU malfunctions (e.g., if runaway occurs) due to causes such as noise, but does not execute the instruction used to clear the binary counter, the binary counter will overflow and an INTWD interrupt will be generated. The CPU will detect malfunction (runaway) due to the INTWD interrupt and in this case it is possible to return to the CPU to normal operation by means of an anti-malfunction program. The watchdog timer begins operating immediately on release of the watchdog timer reset. The watchdog timer is halted in IDLE1 or STOP mode. The watchdog timer counter continues counting during bus release (when BUSAK goes low). When the device is in IDLE2 mode, the operation of WDT depends on the WDMOD setting. Ensure that WDMOD is set before the device enters IDLE2 mode. The watchdog timer consists of a 22-stage binary counter which uses the clock (fIO) as the input clock. The binary counter can output 215/fIO, 217/fIO, 219/fIO and 221/fIO.
WDT counter WDT interrupt
n
Overflow
0
Write clear code WDT clear (Soft ware)
Figure 3.24.2 Normal Mode The runaway detection result can also be connected to the reset pin internally. In this case, the reset time will be 32 clocks (102.4 s at fOSCH = 10 MHz) as shown in Figure 3.24.3. After a reset, the clock fIO is divided fSYS by two, where fSYS is generated by dividing the high-speed oscillator clock (fOSCH) by sixteen through the clock gear function.
Overflow WDT counter WDT interrupt Internal reset 32 clocks (102.4 s at fOSCH = 10 MHz) n
Figure 3.24.3 Reset Mode
92CF26A-630
2007-11-21
TMP92CF26A 3.24.3 Control Registers
The watchdog timer (WDT) is controlled by two control registers WDMOD and WDCR. (1) Watchdog timer mode registers (WDMOD) 1. Setting the detection time for the watchdog timer in This 2-bit register is used for setting the watchdog timer interrupt time used when detecting runaway. On a reset this register is initialized to WDMOD = 00. The detection time for WDT is 215/fIO [s]. (The number of system clocks is approximately 65,536.) 2. Watchdog timer enable/disable control register At reset, the WDMOD is initialized to "1", enabling the watchdog timer. To disable the watchdog timer, it is necessary to clear this bit to "0" and to write the disable code (B1H) to the watchdog timer control register (WDCR). This makes it difficult for the watchdog timer to be disabled by runaway. However, it is possible to return the watchdog timer from the disabled state to the enabled state merely by setting to "1". 3. Watchdog timer out reset connection This register is used to connect the output of the watchdog timer with the RESET terminal internally. Since WDMOD is initialized to 0 at reset, a reset by the watchdog timer will not be performed. (2) Watchdog timer control register (WDCR) This register is used to disable and clear the binary counter for the watchdog timer. * Disable control The watchdog timer can be disabled by clearing WDMOD to 0 and then writing the disable code (B1H) to the WDCR register.
WDCR WDMOD WDCR 0 0 1 1 - 0 0 - 1 0 X 1 1 X 0 1 - 0 1 - 0 0 0 1 Write the clear code (4EH). Clear WDMOD to "0". Write the disable code (B1H).
* Enable control Set WDMOD to "1". * Watchdog timer clear control To clear the binary counter and cause counting to resume, write the clear code (4EH) to the WDCR register.
WDCR 0 1 0 0 1 1 1 0 Write the clear code (4EH).
Note1: If the disable control is used, set the disable code (B1H) to WDCR after write the clear code (4EH) once. (Please refer to setting example.) Note2: If the watchdog timer setting is changed, change setting after setting to disable condition once.
92CF26A-631
2007-11-21
TMP92CF26A
7
WDMOD (1300H) Bit symbol Read/Write Reset State Function 1 1: Enable WDTE
6
WDTP1 R/W 0 00: 2 /fIO 01: 2 /fIO 10: 2 /fIO 11: 2 /fIO
21 19 17 15
5
WDTP0 0
4
3
2
I2WDT 0 IDLE2 0: Stop 1: Operate
1
RESCR R/W 0
0
- 0
WDT control Select detecting time
1: Internally Always connects write "0" WDT out to the reset pin
Watchdog timer out control 0 1 - Connects WDT out to a reset
IDLE2 control 0 1 Stop Operation
Watchdog timer detection time 00 01 10 11 2 /fIO (Approximately 819.2 s at fIO = 40 MHz)
15 17 19 21
2 /fIO (Approximately 3.276 ms at fIO = 40 MHz) 2 /fIO (Approximately 13.107 ms at fIO = 40 MHz) 2 /fIO (Approximately 52.428 ms at fIO = 40 MHz)
Watchdog timer enable/disable control 0 1 Disabled Enabled
Figure 3.24.4 Watchdog Timer Mode Register
7
WDCR (1301H) A readmodify-write operation cannot be performed Bit symbol Read/Write Reset State Function
6
5
4
- W -
3
2
1
0
B1H: WDT disable code 4EH: WDT clear code
WDT disable/clear control B1H 4EH Others Disable code Clear code Don't care
Figure 3.24.5 Watchdog Timer Control Register
92CF26A-632
2007-11-21
TMP92CF26A
3.25 Power Management Circuitry (PMC)
The TMP92CF26A incorporates the power management circuitry (PMC) for managing standby current to minimize the leakage current in deep to sub-quarter-micron technology. The TMP92CF26A is provided with the following six power supply rails. : AVCC & AVSS (for AD converter) Analog power supply : DVCC3A, 3B & DVSSCOM 3-V-A, 3-V-B power supply for digital I/Os (for general pins) 1.5-V-A internal power supply for the digital logic : DVCC1A & DVSSCOM (for general circuits) 1.5-V-B internal power supply for the digital logic : DVCC1B & DVSSCOM (for RTC and PMC) : DVCC1C & DVSS1C 1.5-V-C power supply for oscillator (for high-frequency oscillator and PLL) Each power supply rail is independent of one another (VSS is partially shared). Among the six power supply rails, those that are supplied in Power Cut mode are the ones for external pins (DVCC-3A, DVCC-3B), AD converter (AVCC) and RTC and backup RAM (DVCC-1B). After entering this mode, internal signals that communicate with the circuit blocks powered by DVCC1A and DVCC1C are cut off so that no shoot-through current is generated in the circuitry when the power is removed from those blocks. * DVCC-3A, DVCC-3B This 3-V power supply rail provides power for external pins preventing them from entering a floating state, for turning on/off the external power supplies, and for signaling the wake-up interrupt for exiting the standby state. * AVCC This 3-V power supply rail provides power for the touch panel interface, and for signaling the Wake-up interrupt for exiting the standby state. * DVCC-1B This 1.5-V power supply rail provides power to the RTC, 16 Kbytes of RAM and the PMC.
AVCC DVCC-1C DVCC-1A DVCC-1B DVCC-3A,3B
TMP92CF26A
Signal cutoff circuit
RAM 16KB ADC Control HighOSC CPU, Other logic & RAM 272 KB PMC RTC I/O Reg
INT Port Others
I/O
Low-OSC
AVSS
DVSS-1C
DVSS-COM
XT1
XT2
Figure 3.25.1 Power Supply System
92CF26A-633
2007-11-21
TMP92CF26A 3.25.1 Special Function Register (SFR)
7
PMCCTL (02F0H) Bit Symbol Read/Write System Reset State Hot Reset State Function PCM_ON R/W 0 Data retained Power Cut Mode 0: Disable 1: Enable
6
5
4
3
2
- W 0 - Must be written as 0 Always read as 0
1
WUTM1 R/W 0 Data retained
0
WUTM0
0 Data retained
Warm-up Time 9 00: 2 (15.625 ms) 01: 2 10: 2 11: 2
10 11 12
(31.25 ms) (62.5 ms) (125 ms)
Note1: About 77 s after a wake-up interrupt has been requested, the external PWE terminal changes from low to high. At this point, the warm-up counter starts counting up the time period specified by the WUTM1 and WUTM0 bits. Then, about 92 s later, the internal reset signal is negated. The time required for the power supply voltage to stabilize varies depending on the power supply response and the board conditions. This characteristic should be considered in specifying the warm-up time. Note 2: This register should usually be set in the initial status (all bits are "0"). Writing should be made immediately before the power-cut mode is assumed. Reset the values of all registers to the initial status (all bits are "0") immediately after the power-cut mode. For details, refer to the flow of transition to the power cut status described later.
The operations depending on the setting of the PCM_ON bit are shown below. PCM_ON = 1
External interrupt input Operation after reset No interrupt HOT_RESET signal asserted - Startup from the boot-ROM regardless of the settings of the AM1 and AM0 pins and a program flow jumps to the specified address in the on-chip RAM area. A change in the PWE pin level is used as a trigger to start counting the low-frequency clock. Then HOT_RESET signal negated. Interrupt Startup depending on the settings of the AM1 and AM0 pins
PCM_ON = 0
Operation after hot reset
-
Warm-up counter
Counter stopped
92CF26A-634
2007-11-21
TMP92CF26A 3.25.2 Detailed Description of Mode Transitions
This section explains the procedures for entering and exiting the Power Cut mode. * Entering the Power Cut Mode When entering the Power Cut mode, the CPU needs to be executing in the on-chip RAM. The low-frequency clock (XT) must be enabled. It is also necessary to disable interrupts, and to stop DMA operations, WDT and AD converter. Then, configure the output pins to function as ports through the Pn, PnCR and PnDR registers. At this time, the PM7 pin should be configured as the PWE input pin. Also, the internal RTC pin and the external interrupt pins that are used for waking up from the Power Cut mode should be configured as interrupt inputs and enabled. The interrupt inputs should be configured as rising-edge triggered, if configurable. When the INT4 pin is used as the TSI input, the debounce circuit should be disabled. The wake-up program must be prewritten to the on-chip RAM area at addresses from 46000H to 49FFFH. (Including the initial setting of the WDT and other registers, all the required settings for waking up should be predefined in this wake-up program.) Finally, stop the PLL if it is operated, and specify the warm-up time for waking up from the Power Cut mode (the time period required for the power supply voltage and the high-frequency clock to stabilize) by the PMCCTL bits. Power Cut mode is then entered by writing a 1 to the PMCCTL bit. At this time, the RESET (HOT_RESET) signal is asserted to all the circuits excluding the external I/O and PMC.
Note: As soon as the PMCCTL bit is set to 1, the power management signal (PWE) changes from 1 to 0 and external power supplies are turned off.
92CF26A-635
2007-11-21
TMP92CF26A
1. Configurations Required for Entering the Power Cut Mode (1) Writing the boot program that is executed after the warm-up time has elapsed (46000Hto 49FFFH) Only bit 7 of the PMCCTL register is checked whether it is 1 or 0 in the boot-ROM program. All codes required for initializing registers including WDT must be written in the fixed RAM area (46000Hto 49FFFH). (2) Controlling the low-frequency clock (XT) Entering or exiting the Power Cut mode is performed using the low-frequency clock. Thus, the low-frequency clock (XT) must always be enabled. 2. Mode Transition Sequence (1) Program execution jumps to the on-chip RAM area. Before entering the Power Cut mode, all the sources that might disturb the mode transition must be disabled. a. Disable the Watch Dog Timer b. Disable the A/D converter c. Disable all the DMA functions of the system * Disable the LCDC * Disable the auto-refresh function of SDRAM (switching to the self refresh mode) * Disable the HDMA function (2) Configure the required port settings (through the Pn, PnCR, PnFC and PnDR registers) All the external interrupt inputs usable for wake-up signaling must be configured as rising-edge triggered. When the INT4 pin is used as the TSI input, the debounce circuit should be disabled. (3) Disable interrupts (DI) (4) Stop the PLL operation Program the high-frequency clock frequency fSYS to be fOSCH and stop the PLL operation. (5) Setup the warm-up time: PMCCTL About 77 s after a wake-up interrupt has been requested, the external PWE terminal changes from low to high. At this point, the warm-up counter starts counting up the time period specified by the WUTM1 and WUTM0 bits. Then, about 92 s later, the internal reset signal is negated. The time required for the power supply voltage to stabilize varies depending on the power supply response and the board conditions. This characteristic should be considered in specifying the warm-up time. (Warm-up time can be selected from 15.625 ms, 31.25 ms, 62.5 ms and 125 ms.)
92CF26A-636
2007-11-21
TMP92CF26A
(6) Transition to the Power Cut mode (PMCCTL = 1)
* You can set both the warm-up time specificatotion bits, PMCCTL, and the Power Cut mode enable bit, PMCCTL, simultaneously.
(7) Insert a dummy instruction for waiting for the mode transition time to PCM (recommended to use 20 NOP instructions)
* Any writing access to the PMCCTL register, including the warm-up time configuration, is only allowed upon entering the PCM and immediately after exiting the PCM. The warm-up time must not be preprogrammed. (The PMCCTL register must be written as 00h at timings other than the above.)
92CF26A-637
2007-11-21
TMP92CF26A
* Exiting the Power Cut Mode The Power Cut mode can be exited by the assertion of external interrupt or the internal reset. (It is prohibited to exit the reset state when DVCC1A is off. A reset signal must be asserted after supplying power to DVCC1A and waiting for its voltage to fully stabilize.) The interrupts that can be used to exit the Power Cut mode are the RTC interrupt, INT0 to INT7 (TSI interrupts) and INTKEY interrupts. Table 3.25.1 Interrupts Used for Waking Up from the PCM Interrupt Source
RTC
Symbol
INTRTC INT0 INT1 INT2 INT3
Remarks
Only configurable as rising-edge triggered Only configurable as rising-edge triggered Only configurable as rising-edge triggered Only configurable as rising-edge triggered When used as TSI, the debounce circuit should be disabled. Only configurable as rising-edge triggered Only configurable as rising-edge triggered Only configurable as rising-edge triggered Only configurable as rising-edge triggered KI0 to KI8 Only configurable as falling-edge triggered
External
INT4 INT5 INT6 INT7
Key
INTKEY
When an interrupt request is accepted, the power management signal (PWE) changes from 0 to 1 allowing for the power to be supplied to each block, from which power has been removed. After the warm-up time specified by the PMCCTL bits has elapsed, HOT_RESET is automatically negated and the CPU boots from the on-chip boot ROM regardless of the external AM pin state. All external ports retain the state of before entering the Power Cut mode except for the PnDR pin, which is also negated upon negation of HOT_RESET. * Output pin: Hi-Z state Set to 1 or 0 * Input gates of input pins: OFF ON The PMCCTL bit in the PMC is first checked in the on-chip boot-ROM program. If this bit is set to 1, a program execution jumps to address 46000H in the on-chip RAM before initializing any registers. The bit in the PMC is cleared to "0" by software. At the same time, ensure that the warm-up time is reset to the initial value. (The PMCCTL bits must be written as 00h.)
Note 1: The signals that are serviced as interrupt signals in normal mode can be used as Wake-up signals to exit the Power Cut Mode. Note 2: Once the PMCCTL bit is set to 1, it remains in this state. To re-enter the Power Cut ode, it is necessary to clear this bit to 0 once and then set it to 1 again. At this time, it is required to wait for at least 31 s after clearing the PCM_ON bit to 0. Note 3: Please not that some settings must be configured by software,for the Power Cut mode is exited using the boot ROM.
7
BROMCR Bit Symbol (016CH) Read/Write Reset State Function
6
5
4
3
2
CSDIS 1
NAND Flash Area CS Output 0: Enable 1: Disable
1
ROMLESS R/W 0
Boot-ROM 0: Enable 1: Disable
0
VACE 1
Vector Address Translation 0: Disable 1: Enable
92CF26A-638
2007-11-21
TMP92CF26A 3.25.3 Detailed Descriptions and Timing Considerations
2. A maximum of 2.5 clock cycles (77 s) are needed after an interrupt is requested. 3. A minimum of 1 clock cycle (31 s) is needed for entering PCM again.
1. A maximum of 3 clock cycles (92 s) are needed for entering PCM.
CPU state transition
Normal Power Cut Mode (PCM) Warm-up 3CLK Normal
XT2 PMCCTL PWE pin
INTRTC INT0-7, INTKEY
Interrupt enabled period
Internal HOT_RESET
Drive register active period
Port state
1. This interrupt is ignored.
4. These interrupts are ignored.
5. The drive register setting is released a maximum of 1 clocks (31 s) after the end of warm-up.
Internal HOT_RESET assert to dead circuit only. (DVCC1A &DVCC1C circuit) 1. When PMCCTL = 1, mode transition from normal mode to the Power Cut mode takes a maximum of three low-frequency clock cycles (about 92 s). During this period, the external wake-up requests are ignored. A maximum of 2.5low-frequency clock cycles (about 77 s) is required for the PWE pin to change from 0 to 1 after the wake-up interrupt is received. After exiting the Power Cut mode, the PMCCTL bit is cleared to 0 by soft ware to return to normal mode. To enter the Power Cut mode again, the PMCCTL bit should be once cleared to 0 and set to 1 again. In this case, the PMCCTL bit should be fixed at 0 for a minimum of one low-frequency clock cycle (about 31 s). Otherwise, the PCM may not be entered by changing its state from 1 to 0 and to 1 again. The wake-up triggers asserted during the wake-up operation from the PCM are ignored. When a maximum of one low-frequency clock cycle (about 31 s) has elapsed after the warm-up counter is expired, the DRV setting of every port is switched to the normal setting. Then, two low-frequency clock cycles (about 62 s) later, the internal reset signal (Hot_Reset) is negated.
2. 3.
4. 5.
92CF26A-639
2007-11-21
TMP92CF26A
Regulator
Regulator 3.3 V
1.5 V
SW en
Delay Circuit SW en SW en 0 S1
TMP92CF26A
AVCC DVCC-1C
DVCC-1A
DVCC-1B DVCC-3A, 3B Power-On Reset Circuit
RTC ADC CPU Other Logic High_OSC LOW_OSC RAM16kB PMC I/O
RESET
Power management signal (PWE)
External interrupts INT0-INT7 (INT4 can be programmed as AVSS DVSS-1C DVSS-COM XT1 XT2 TSI.) INTKEY
Main Power
Figure 3.25.2 Application Circuit Examples of the PMC Figure 3.25.2 shows the examples of the PMC application circuit. In normal mode, the power management pin (PWE) goes high, which allows the power to be supplied to all the blocks in the TMP92CF26A. In the Power Cut mode, the PWE pin goes low, which allows the power to be removed from the on-chip circuit blocks excluding the CPU, part of on-chip RAM, AD converter and RTC. This leads to a reduction of the leakage current. In the Power Cut mode, power is supplied only to the followings: I/O (including the AD pins), TSI circuit, 16 Kbytes of on-chip RAM, low-frequency oscillation circuit, RTC and PMC.
92CF26A-640
2007-11-21
TMP92CF26A 3.25.4 Notes on Power-On/Off Sequences
As shown below, in the initial power-on sequence, power must be supplied to the on-chip circuit blocks first and then to the external circuit blocks. Also, in the complete power-off sequence, power must be removed from the external circuit blocks and then from the on-chip circuit blocks. Power-on (DVCC1A, DVCC1B, DVCC1C) (DVCC3A, DVCC3B, AVCC) Power-off (AVCC, DVCC3A, DVCC3B) (DVCC1C, DVCC1B, DVCC1A)
When Powering On Power Cut Mode (PMC) When Powering Off
* Power On/Off Sequences (Initial Power ON/Complete Power OFF)
DVCC1A DVCC1B DVCC1C
1.5-V rails should be turned on first, followed by the 3.3-V rails. Power should rise and stabilize within 100 ms. Power should fall and stabilize within 100 ms. 3.3-V rails should be turned off first, followed by the 1.5-V rails.
DVCC3A
DVCC3B
AVCC
High-frequency Oscillation Stabilizing Time 20 system clock cycles
RESET
PWE terminal
Note1: Although it is possible to turn on or off the 1.5-V and 3.3-V power supply rails simultaneously, it may cause external pins to temporarily become unstable. Therefore, if there is any possibility that this would affect peripheral devices connected with the TMP92CF26A, external power supplies should be turned on or off while the internal power supplies are stable, as indicated by the heavy lines in the diagram above. Note2: In the power-on sequence, the 3.3-V power supply rails must not be turned on before the ones of 1.5-V. In the power-off sequence, the 3.3-V power supply rails must not be turned off after the ones of 1.5-V.
92CF26A-641
2007-11-21
TMP92CF26A 3.25.5 Programming Example
Example 1: Mode transition to the PCM Condition: Wake-up trigger = INT4 (TSI) org ld ldw ldw ldw ldw ld ld ld ld ld ld ld ld di ld (pmcctl),80h 002000h (syscr0),40h (wdmod),0b100h (admod0),0000h (admod2),0000h (admod4),0000h (lcdctl0),00h (pmfc),80h (p9fc),40h (inte34),50h (tsicr1),00h (pllcr0), 00h (pllcr1), 00h (pmcctl),00h ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Enable the PCM_ON bit (Enters the Power Cut mode) * Before you program the PMCCTL register at this point, the PMCCTL register must remain in the reset state: 00h. nopx20 ; After Wake-up org ld 046000h (pmcctl),00h ; Disable the PCM_ON bit * At the same time, the warm-up time must be set to default. (The PMCCTL register must be written as 00h.) Wait until PCM is entered Disable the debounce circuit Change the CPU clock from PLL to fOSCH Stop the PLL circuit Program the warm-up time Disable DMA operation Program the PM7 port as PWE Enable INT4 and program the interrupt level Enable the low-frequency clock Disable the WDT Disable the AD converter
92CF26A-642
2007-11-21
TMP92CF26A
Example 2: Mode transition to the PCM Condition: SDRAM= Self-refresh mode ld ldw ldw ldw ldw ld ld ld ei dl ld ld (syscr0),40h (wdmod),0b100h (admod0),0000h (admod2),0000h (admod4),0000h (lcdctl0),00h (pmcctl),00h (inte0),55h 5 0,0 (pccr),00h (pcfc),01h ; ; ; ; ; ; ; ; ; ; ; ; ; ;((( Entry Self Refresh mode ))) res ld ABP: ld cp jr a,(sdcmm) a,00h nz,ABP ld (sdcmm),02h ; ; ; ; ; ; ; Perform polling until the All Bank Precharge command is finished Select the Self Refresh Entry command Note: Execute at least 10 bytes of NOP or other instructions. Clear the PJ7 bit Configure as Port function Configure the PJDR register Disable the Self Refresh auto exit function Select the All Bank Precharge command Program PC0-PC3 as INT0-INT3 Disable the LCDC Program the warm-up time Enable INT0 and program the interrupt level to 5 Enable the low-frequency clock Disable the WDT Disable the AD converter
ld nopx10
(sdcmm),05h
; ;
ld ld ld ;((( Entry PMC mode ))) di ;--- PLL off setting ----ld ld ld
(pj),7fh (pjfc),1fh (pjdr),80h
; ; ;
(pllcr0),00h (pllcr1),00h (pmcctl),80h nopx20
; ; ; ;
Program the clock signal as: fSYS=fOSCH Stop the PLL circuit Enable PCM condition (Start PCM mode) Wait until PCM is entered
; After Wake-up org ld 046000h (pmcctl),00h ; ; Disable the PCM_ON bit Note: At the same time, the warm-up time must be set to default as well. (The PMCCTL register must be written as 00H) Note: SDRAMC is initialized by hot reset upon a wake-up. The SDCKE pin output is initialized to 1 by initializing the SDRAMC. Therefore, SDRAM exits from self-refresh mode. Auto-refresh function of the SDRAMC register is disabled at same time. Therefore, SDRAM data might be lost. However, though the SDRAMC is initialized by hot reset, port configurations are not initialized by Hot reset. Thus, SDRAM can retain its contents. To keep SDRAM data, program the PJ7 pin as the SDCKE pin and drive it low before entering the PMC mode. The output level of the PJ7 pin while in PMC mode is determined by the PJ and PJDR register settings. Please program the PJ7 pinto be driven low while in PMC mode in the same manner as shown above.
92CF26A-643
2007-11-21
TMP92CF26A
3.26 Multiply and Accumulate Calculation Unit (MAC)
The TMP92CF26A includes a multiply-accumulate unit (MAC) capable of 32-bit x 32-bit + 64-bit arithmetic operations at high speed. The MAC has the following features: One-cycle execution for all MAC operations (excluding register access time) Three operation modes : 1) 64-bit + 32-bit x 32-bit 2) 64-bit - 32-bit x 32-bit 3) 32-bit x 32-bit - 64-bit Support for signed/unsigned operations Support for integer operations only
3.26.1
Registers
The MAC in the TMP92CF26A has one control register and three data registers. These registers are connected to the CPU via a 32-bit bus and can be accessed in one system clock (fSYS).
3.26.1.1 Control Register The control register is used to control the operation of the MAC. MAC Control Register 7
MACCR (1BFCH) A readmodifywrite operation cannot be performed bit Symbol Read/Write Reset State Function flag
0: No overflow 1: Overflow occurred
6
MOPST W 0 soft start
0:Don't care 1:Start calculation
5
MSTTG2 0
4
MSTTG1 0
3
MSTTG0 R/W 0
2
MSGMD 0
0: Unsigned 1: Signed
1
MOPMD1 0 00: 64 + 32x32 01: 64 - 32x32 10: 32x32 - 64 11: Reserved
0
MOPMD0 0
MOVF R/W 0 Overflow
Calculation Calculation start trigger 000: Write to MACMA<7:0> 001: Write to MACMB<7:0> 010: Write to MACMOR<7:0> 011: Write to MACMOR<39:32> 1xx: Write of "1" to
Sign mode Calculation mode
Note 1: is write-only and it is read as "0". Note 2: Writing "1xx" to and writing "1" to can be executed in the same write cycle. Note 3: is fixed two system clocks (fSYS) after calculation is started.
92CF26A-642
2007-11-21
TMP92CF26A
3.26.1.2 Data Registers The data registers are arranged as shown below. Data Registers
Bits<63:56> Multiplier A Register Multiplier B Register MAC Register MACORH (1BEFH) (1BEEH) (1BEDH) (1BECH) (1BEBH) (1BEAH) (1BE9H) Bits<55:48> Bits<47:40> Bits<39:32> Bits<31:24> (1BE3H) (1BE7H) Bits<23:16> (1BE2H) (1BE6H) Bits<15:8> (1BE1H) (1BE5H) Bits<7:0> MACMA (1BE0H) MACMB (1BE4H) MACORL (1BE8H)
Note 1: After reset, all the registers are cleared to "0". Note 2: Read-modify-write instructions can be used on all the registers. Note 3: All the registers can be accessed in long word, word, or byte units. (In case of using "sign mode", it can be accessed in long word only) Note 4: When MACCR is set to "0", "001", "010" or "011" and the registers are written in word or byte units, the <7:0> bits of each register must be written last. Note 5: The MACORL register is fixed one system clock (fSYS) after calculation is started, and the MACORH register is fixed two system clocks (fSYS) after calculation is started. Therefore, to read the MACOR register immediately after calculation, be sure to read the MACORL register first. Note 6: In case of using "sign mode", MACCR = 1, it must need to write to MACMA and MACMB register with longword (32bit).
92CF26A-643
2007-11-21
TMP92CF26A 3.26.2 Description of Operation
(1) Calculation mode The MAC has the following three types of calculation mode. The calculation mode to be used is specified in MACCR. MACCR is used to select unsigned or signed mode. The operation of each calculation mode is explained below. (a) 64 + 32 x 32 mode In this mode, the contents of the MACMA register and the MACMB register are multiplied and the result is added to the contents of the MACOR register. Then, the result is stored back in the MACOR register.
63 MACOR 0 31 0 MACMA 31 63 MACMB MACOR 0
+
x
(b) 64 - 32 x 32 mode In this mode, the contents of the MACMA register and the MACMB register are multiplied and the result is subtracted from the contents of the MACOR register. Then, the result is stored back in the MACOR register.
63 MACOR 0 31 0 MACMA 31 63 MACMB MACOR 0
-
x
(c) 32 x 32 - 64 mode In this mode, the contents of the MACMA register and the MACMB register are multiplied and the contents of the MACOR register are subtracted from the result. Then, the result is stored back in the MACOR register.
31 MACMA 0 31 0 MACMB 63 0 MACOR 63 MACOR 0
x
-
92CF26A-644
2007-11-21
TMP92CF26A
(d) Sign mode Both multiply-accumulate and multiply-subtract operations can be executed in unsigned or signed mode. In signed mode, the MACMA, MACMB, and MACOR registers become signed registers, and the most significant bit is treated as the sign bit and the data set in each register is treated as a two's complement value. Table 3.26.1 shows the range of values that can be represented in each sign mode. Table 3.26.1 Data Range in Unsigned/Signed Mode MACMA, MACMB Registers
Unsigned Signed 0 2 -1 -2
31 32
MACOR Register
0 2 -1 -2
63 64
+2 -1
31
+2 -1
63
Use signed mode when the values to be set in the MACMA and MACMB registers are signed (two's complement) data. Even in unsigned mode it is possible to set signed (two's complement) data in the MACOR register to perform additions and subtractions in signed mode. In case of using "sign mode", MACCR = 1, it must need to write to MACMA and MACMB register with longword (32bit).
(2) Calculation start trigger As a trigger to start calculation, writing to the MACMA, MACMB or MACOR register or soft start (MACCR=1) can be selected in MACCR. (3) Overflow flag When an overflow occurs in the calculation result (see Table 3.26.2), MACCR is set to "1". Once an overflow occurs, MACCR is held at "1" regardless of subsequent calculation results. Since the overflow flag is not automatically cleared by a read operation, it is necessary to write "0" to clear this flag. Table 3.26.2 Overflow Definitions Sign Mode Calculation Result (MACOR register value)
MACOR > 2 -1
64
MACCR
1 0 1 1 0 1
Signed
0 MACOR 2 -1
64
MACOR < 0 MACOR > 2 -1
63
Unsigned
-2 MACOR 2 -1
63 63
MACOR < -2
63
92CF26A-645
2007-11-21
TMP92CF26A 3.26.3 Operation Examples
(1) Unsigned multiply-accumulate operation The following shows a setting example for calculating "33333333 + 11111111 x 22222222":
ld ld ld ld ld ld ld ld ld ld bit jp ld (MACCR), 0x08 xde, 0x00000000 xhl, 0x33333333 xix, 0x11111111 xiy, 0x22222222 (MACORL), xhl (MACORH), xde (MACMA), xix (MACMB), xiy xhl, (MACORL) 7, (MACCR) nz, ERROR xde, (MACORH) ; Unsigned multiply-accumulate mode Start calculation by write to MACMB.
; Write 33333333 to MACORL. ; Clear MACORH. ; Write 11111111 to MACMA. ; Write 22222222 to MACMB. ; Read lower result 0x41FDB975. ; Check over-flow error ; Go to error routine, if there is over-flow error ; Read upper result 0x02468ACF. Calculation start
(2) Signed multiply-subtract operation The following shows a setting example for calculating "33333333 - 11111111 x -22222222":
ld ld ld ld ld ld ld ld ld set ld bit jp ld (MACCR), 0x25 xde, 0x00000000 xhl, 0x33333333 xix, 0x11111111 xiy, 0xDDDDDDDE (MACORL), xhl (MACORH), xde (MACMA), xix (MACMB), xiy 5, (MACCR) xhl, (MACORL) 7, (MACCR) nz, ERROR xde, (MACORH) ; Signed multiply-subtract mode Start calculation by write of "1" to .
; -22222222 ; Write 33333333 to MACORL. ; Clear MACORH. ; Write 11111111 to MACMA. ; Write -22222222 to MACMB. ; ; Read lower result 0x41FDB975. ; Check over-flow error ; Go to error routine, if there is over-flow error ; Read upper result 0x02468ACF. Calculation start
(3) Unsigned multiply-accumulate operation (two multiply-accumulate operations) The following shows a setting example for calculating "(33333333 + 11111111 x 22222222) + (11111111 x 44444444)":
ld ld ld ld ld ld ld ld ld ld ld ld bit jp ld (MACCR), 0x08 xde, 0x00000000 xhl, 0x33333333 xix, 0x11111111 xiy, 0x22222222 xiz, 0x44444444 (MACORL), xhl (MACORH), xde (MACMA), xix (MACMB), xiy (MACMB), xiz xhl, (MACORL) 7, (MACCR) nz, ERROR xde, (MACORH) ; Write 33333333 to MACORL. ; Clear MACORH. ; Write 11111111 to MACMA. ; Write 22222222 to MACMB. ; Write 44444444 to MACMB. ; Read lower result 0x5F92C5F9. ; Check over-flow error ; Go to error routine, if there is over-flow error ; Read upper result 0x06D3A06D. Calculation start Calculation start ; Unsigned multiply-accumulate mode Start calculation by write to MACMB.
92CF26A-646
2007-11-21
TMP92CF26A
3.27 Debug Mode
The TMP92CF26A includes a debug support unit (DSU) for enabling on-board debugging. The DSU has 9 debug pins for interfacing with an external emulator via a DSU connector to be mounted on the target board and a DSU connecting cable. For details about debugging, please refer to the instruction manual of the emulation pod to be used. This section provides product-specific explanations related to debug mode. (1) Connection method
TMP92CF26A EI_PODDATA EI_SYNCLK EI_PODREQ EI_REFCLK EI_TRGIN EI_COMRESET EO_MCUDATA EO_MCUREQ EO_TRGOUT DSU Connector
Target Board
DSU Connecting Cable
Emulation Pod
Controller
PC
DBGE
Note: When connecting the TMP92CF26A and an emulator in debug mode, place the DSU connector on the target board as near (less than 5cm) to the TMP92CF26A as possible. It is desirable that all the signals are same length. Recommend connector: SAMTEC FTSH-110-01-DV-EJ
(2) How to enter debug mode Debug mode can be entered by setting the DBGE pin to Low. To return to normal mode from debug mode, be sure to set the DBGE pin to High and then reset the system using the RESET pin. In details of debus mode, refer the manual of emulation POD.
92CF26A-649
2007-11-21
TMP92CF26A
(3) Limitations in debug mode Debug mode has the following limitations: 1) Target reset While debugging is being performed, the system reset ( RESET pin) of the target (microcontroller) must not be used to reset the controller and microcontroller. Instead, reset should be performed from the controller. (For details, please refer to the instruction manual of the emulation pod to be used.)
*If reset from the microcontroller by the RESET pin may clash the register information and internal RAM data in the CPU, including not only programs but also breakpoint and trace information.
92CF26A-650
2007-11-21
TMP92CF26A
2) Pins In debug mode, a total of 9 pins (PZ0 to PZ7 in Port Z and PU7 in Port U) are used to connect the TMP92CF26A with an emulator via a DSU probe for communicating with the controller. For this reason, these 9 pins cannot be debugged. Therefore, if the port control register of each pin is changed in debug mode, the register contents are changed but the function of each pin remains the same. Port Z Register 7
PZ (0068H) bit Symbol Read/Write Reset State PZ7
6
PZ6
5
PZ5
4
PZ4 R/W
3
PZ3
2
PZ2
1
PZ1
0
PZ0
External pin data (Output latch is reset to "0".)
Port Z Control Register 7
PZCR (006AH) bit Symbol Read/Write Reset State Function 0 0 0 0 0: Input PZ7C
6
PZ6C
5
PZ5C
4
PZ4C W
3
PZ3C 0 1: Output
2
PZ2C 0
1
PZ1C 0
0
PZ0C 0
Port Z Function Register 7
PZFC (006BH) bit Symbol Read/Write Reset State Function 0 0 0 0 0: Port PZ7F
6
PZ6F
5
PZ5F
4
PZ4F W
3
PZ3F 0
2
PZ2F 0
1
PZ1F 0
0
PZ0F 0
Port Z Drive Register 7
PZDR (009AH) bit Symbol Read/Write Reset State Function 1 1 1 1 PZ7D
6
PZ6D
5
PZ5D
4
PZ4D R/W
3
PZ3D 1
2
PZ2D 1
1
PZ1D 1
0
PZ0D 1
Input/output buffer drive register for standby mode
Note: Although it is possible to write to shaded bits, writing to these bits has no effect (the DSU communication function is given a higher priority).
92CF26A-651
2007-11-21
TMP92CF26A
Port U Register 7
PU (00A4H) Bit Symbol Read/Write Reset State PU7
6
PU6
5
PU5
4
PU4 R/W
3
PU3
2
PU2
1
PU1
0
PU0
External pin data (Output latch is reset to "0".)
Port U Control Register 7
PUCR (00A6H) Bit Symbol Read/Write Reset State Function 0 0 0 0 PU7C
6
PU6C
5
PU5C
4
PU4C
3
PU3C W 0
2
PU2C 0
1
PU1C 0
0
PU0C 0
0: Input 1: Output
Port U Function Register 7
PUFC (00A7H) Bit Symbol Read/Write Reset State Function 0 0 0 0 PU7F
6
PU6F
5
PU5F
4
PU4F
3
PU3F W 0
2
PU2F 0
1
PU1F 0
0
PU0F 0
0: Port 1: Data bus for LCDC (LD23 to LD16) Note: When LD23 to LD16 are used, set to "1".
Port U Drive Register 7
PUDR (009CH) Bit Symbol Read/Write Reset State Function 1 1 1 1 PU7D
6
PU6D
5
PU5D
4
PU4D
3
PU3D R/W 1
2
PU2D 1
1
PU1D 1
0
PU0D 1
Input/output buffer drive register for standby mode
Note: Although it is possible to write to shaded bits, writing to these bits has no effect (the DSU communication function is given a higher priority).
92CF26A-652
2007-11-21
TMP92CF26A
3) Boot function In this LSI, we support boot function, however, this boot function is not available in debug mode. (It is inhibit to set DBGE = "0", AM0 = "1" and AM1 = "1" at the same time.) 4) PMC function In debug mode, the PMC function for cutting off the power supply to internal circuitry and reducing standby current is not also available.
BROMCR Register Specifications in Debug Mode 7
BROMCR Bit symbol (016CH) Read/Write Reset State Function 1 NAND Flash area CS output 0: Enable 1: Disable
6
5
4
3
2
CSDIS
1
ROMLESS R/W
1* Boot ROM
0
VACE 1/0 Vector address conversion 0: Disable 1: Enable
0: Used 1: Not used
7
PMCCTL (02F0H) bit symbol Read/Write System Reset State Hot Reset State Function PCM_ON R/W 0 Data retained Power Cut Mode 0: Disable 1: Enable
6
5
4
3
2
-
1
WUTM1 R/W 0
-
0
WUTM0
W 0
-
0
-
Always write "0". Always
Warm-up time 9 00: 2 (15.625 ms) 01: 2 10: 2
10 11 12
(31.25 ms) (62.5 ms) (125 ms)
read as "0". 11: 2
Note: Even if the bit is set to "1", the Power Cut Mode cannot be entered (the external PWE pin is not set to "0").
92CF26A-653
2007-11-21
TMP92CF26A
5) Data bus occupancy The TMP92CF26A includes three controllers (LCD controller, SDRAM controller and DMAC) that function as bus masters apart from the CPU. Therefore, it is necessary to estimate the bus occupancy time of each bus master and control each function accordingly to ensure proper operation of each function. (For details, please refer to the chapter on the DMA controller.) In debug mode, in addition to the operations of these bus masters, a steal program that runs in the background must also be taken into account in programming. When the program stops at a breakpoint (including step execution), the CPU operation is halted but the LCD controller, SDRAM controller and DMA controller remain active. At this time, the steal program also runs in the background. Once the steal program obtains the bus, it occupies the bus for 80 times of debug transmission clock (LH_SYNCLK) maximum. Therefore, in some cases, other DMA operations (LCD display, DMAC data transfer, SDRAM refresh) may not be performed at desired timing.
Setup time 1
LHSYNC LCP0 LD-bus LCD DMA operation 1 2
Setup time 2
HDMA operation (Worst case) LCD DMA operation 2
1
Figure 3.27.1 Example of Data Bus Occupancy Timing in Non-Debug Mode
Figure 3.27.1 shows an example of data bus occupancy timing in non-debug mode, depicting the LHSYNC signal, LCP0 signal, and LD-bus signal for transferring data from the LCD controller to the LCD driver, and the LCD DMA operation timing for reading data from the display RAM. If HDMA is asserted immediately before the DMA operation for the LCD (LCD DMA operation 1) is started, this operation must wait until HDMA is finished before it can be performed (LCD DMA operation 2). Taking the above into account, it is necessary to ensure that each LCD DMA operation is finished before the next LCD driver output is started.
92CF26A-654
2007-11-21
TMP92CF26A
Setup time 1
LHSYNC LCP0 LD-bus LCD DMA operation 1 3
Setup time 2
HDMA operation 1 (Worst case) Steal operation (Worst case) LCD DMA operation 2
2
1
HDMA operation 2
Figure 3.27.2 Example of Data Bus Occupancy Timing in Debug Mode
Figure 3.27.2 shows an example of data bus occupancy timing in debug mode. If the steal program issues a wait request immediately before the DMA operation for the LCD (LCD DMA operation 1) and HDMA (HDMA operation 1) are asserted, these operations must wait until the steal program is finished before they can be performed. (LCD DMA is given a higher priority than HDMA in bus arbitration. This means that bus requests is sued for LCD DMA and HDMA while the steal program is running are processed in the order of LCD and HDMA (LCD DMA operation 2 HDMA operation 2) regardless of the order in which they are issued. ) Taking the above into account, it is necessary to ensure that each LCD DMA or HDMA operation is finished before the next LCD driver output is started. In other words, to avoid abnormal operation in debug mode, the maximum duration of HDMA operation time must be set so that it does not interfere with LCD DMA operation. Alternatively, the LHSYNC period should be adjusted to accommodate a wait request by the steal program (80 times of transmission for debug clock: LH_SYNCLK), although this slightly reduces the LCD display quality.
92CF26A-655
2007-11-21
TMP92CF26A
4.
4.1
Electrical Characteristics
Absolute Maximum Ratings
Symbol
DVCC3A DVCC3B DVCC1A DVCC1B DVCC1C AVCC VIN IOL IOH IOL IOH PD TSOLDER TSTG TOPR TOPR Input Voltage Output Current (1pin) Output Current (1pin) Output Current (total) Output Current (total) Power Dissipation (Ta = 85C) Soldering Temperature (10s) Storage Temperature Operation Temperature Operation Temperature (80MHz) -0.3 to 3.9 -0.3 DVCC3A/3B+0.3 (Note1) -0.3 to AVCC + 0.3 (Note2) 15 -15 80 -50 600 260 -65 to 150 -0 to 70 -0 to 50 V mA mA mA mA mW C C C C Power Supply Voltage
Contents
Rating
-0.3 to 3.9
Unit
-0.3 to 3.0
V
Note1: If setting it, don't exceed the Maximum Ratings of DVCC3A (PV port and PW port are DVCC3B). Note2: In PG0 to PG5, P96,P97,VREFH,VREFL maximum ratings for AVCC is applied. Note3: The absolute maximum ratings are rated values that must not be exceeded during operation, even for an instant. Any one of the ratings must not be exceeded. If any absolute maximum rating is exceeded, a device may break down or its performance may be degraded, causing it to catch fire or explode resulting in injury to the user. Thus, when designing products that include this device, ensure that no absolute maximum rating value will ever be exceeded.
Solderability of lead free products Test parameter
Solderability
Test condition
Use of Sn-37Pb solder Bath Solder bath temperature = 230C, Dipping time = 5 seconds The number of times = one, Use of R-type flux Use of Sn-3.0Ag-0.5Cu solder bath Solder bath temperature = 245C, Dipping time = 5 seconds The number of times = one, Use of R-type flux (use of lead free) Pass:
Note
solderability rate until forming 95%
92CF26A-656
2007-11-21
TMP92CF26A
4.2
Symbol
DC Electrical Characteristics
Parameter
General I/O Power Supply Voltage (DVCC = AVCC) (DVSSCOM = AVSS = 0V) Internal Power A Internal Power B High CLK oscillator and PLL Power Input Low Voltage for D0 to D7 P10 to P17 (D8 to 15), P60 to P67 P71 to P76, P90 PC4 to PC7, PF0 to PF5 PG0 to PG5, PJ5 to PJ6 PN0 to PN7, PP1 to PP2 PR0 to PR3, PT0 to PT7 PU0 to PU7, PX5, PX7 Input Low Voltage for 1.4 1.5 1.6 V
Min
Typ.
Max
Unit
Condition
DVCC3A
3.0
3.3
3.6
V
X1=6 to 10MHz CPU CLK (80MHz) XT1=30 to 34KHz
DVCC1A DVCC1B DVCC1C
VIL0
-
0.3xDVCC3A
3.0 DVCC3A 3.6
VIL1
PV0 to PV2, PV6 to PV7, PW0 to PW7 Input Low Voltage for P91 to P92, P96 to P97,
-0.3
-
0.3xDVCC3B
V
3.0 DVCC3B 3.6
VIL2
PA0 to PA7 PC0 to PC3, PP3 to PP5, PZ0 to PZ7, RESET
-
0.25xDVCC3A
3.0 DVCC3A 3.6
VIL3 VIL4 VIL5
Input Low Voltage for AM0 to AM1, DBGE Input Low Voltage for X1 Input Low Voltage for XT1
- - -
0.1xDVCC3A 0.1xDVCC1C 0.15 xDVCC3A
3.0 DVCC3A 3.6 1.4 DVCC1C 1.6 3.0 DVCC3A 3.6
Note: Above power supply range is premised that all power supply of same system is equal. (DVCC1A = DVCC1B = DVCC1C or DVCC3A = DVCC3B=AVCC)
92CF26A-657
2007-11-21
TMP92CF26A
Symbol
D0 to D7
Parameter
Input High Voltage for P10 to P17 (D8 to 15), P60 to P67 P71 to P76, P90
Min
Typ.
Max
Unit
Condition
VIH0
PC4 to PC7, PF0 to PF5 PG0 to PG5, PJ5 to PJ6 PN0 to PN7, PP1 to PP2 PR0 to PR3, PT0 to PT7 PU0 to PU7, PX5, PX7 Input High Voltage for
0.7 x DVCC3A
-
DVCC3A + 0.3
3.0 DVCC3A 3.6
VIH1
PV0 to PV2, PV6 to PV7, PW0 to PW7 Input High Voltage for P91 to P92, P96 to P97,
0.7 x DVCC3B
-
DVCC3B + 0.3
V
3.0 DVCC3B 3.6
VIH2
PA0 to PA7 PC0 to PC3, PP3 to PP5, PZ0 to PZ7, RESET
0.75 x DVCC3A
-
DVCC3A + 0.3
3.0 DVCC3A 3.6
VIH3 VIH4 VIH5
Input High Voltage for AM0 to AM1 , DBGE Input High Voltage for X1 Input High Voltage for XT1
0.9 xDVCC3A 0.9 xDVCC1C 0.85 x DVCC3A
- - -
DVCC3A + 0.3 DVCC1C + 0.3 DVCC3A + 0.3
3.0 DVCC3A 3.6 1.4 DVCC1C 1.6 3.0 DVCC3A 3.6
92CF26A-658
2007-11-21
TMP92CF26A
Symbol
Parameter
Output Low Voltage1 P90 to P92, PC0 to PC3, PC7 PF0 to PF5, PK1 to PK7 PM1 to PM2, PM7 PN0 to PN7, PP1 to PP7 PV0 to PV7, PW0 to PW7, PX5, PX7 Output Low Voltage2 Except VOL1 output pin Output High Voltage1 P90 to P92, PC0 to PC3, PC7 PF0 to PF7, PK1 to PK7 PM1 to PM2, PM7 PN0 to PN7, PP1 to PP7 PV0 to PV7, PW0 to PW7 PX5, PX7 Output High Voltage2 Except VOL1 output pin Internal resistor (ON) MX, MY pins Internal resistor (ON) PX, PY pins Input Leakage Current Output Leakage Current Pull Up/Down Resistor for RESET , PA0 to PA7, P96 Pin Capacitance Schmitt Width for P91 to P92, P96 to P97,
Min
Typ.
Max
Unit
Condition
VOL1
IOL = 0.5mA, 3.0 DVCC3A - - 0.4
VOL2
IOL = 2mA, 3.0 DVCC3A V
VOH1
IOH = -0.5mA, 3.0 DVCC3A 2.4 - -
VOH2 IMon IMon ILI ILO RRST CIO
IOH = -2mA, 3.0 DVCC3A - - - - 30 - - - 0.02 0.05 50 - 30 30 5 10 70 10 A A K pF fc = 1MHz VOH = VCC -0.2V 0.0 Vin DVCC3A 0.2 Vin DVCC3A-0.2V VOL = 0.2V VCC = 3.0 to 3.6 V
VTH
PA0 to PA7, PC0 to PC3, PP3 to PP5, PZ0 to PZ7, RESET
0.6
0.8
1.0
V
3.0 DVCC3A 3.6
Note1 : Typical values are value that when Ta = 25C and Vcc = 3.3 V unless otherwise noted. Note2 : This data shows exept "debug mode"
92CF26A-659
2007-11-21
TMP92CF26A
Symbol
Parameter
NORMAL (Note2) IDLE2 NORMAL (Note2) IDLE2 IDLE1
Min
- - - - -
Typ.
15 45 0.5 28 12 34 0.4 21 12 200 6
Max
30 60 1 45 23 45 0.8 34 45 3200 35 30 50
Unit
PLL_ON fSYS=80MHz mA PLL_ON fSYS=60MHz PLL_OFF fSYS =10MHz Ta 70C Ta 50C Ta 70C
Condition
DVCC3A,3B = 3.6V DVCC1A,1B,1C = 1.6V DVCC3A,3B = 3.6V DVCC1A,1B,1C = 1.6V DVCC3A,3B = 3.6V DVCC1A,1B,1C = 1.6V DVCC3A,3B = 3.6V DVCC1A,1B,1C = 1.6V DVCC3A,3B = 3.6V DVCC1A,1B,1C = 1.6V DVCC3A = 3.6V DVCC3B = 3.6V AVCC = 3.6V DVCC1A = 0V DVCC1B = 1.6V DVCC1C =0V XT = 32KHz X = OFF Ta 70C Ta 50C Ta 70C DVCC3A = 3.6V DVCC3B = 3.6V AVCC3.6V DVCC1A = 1.6V DVCC1B = 1.6V DVCC1C = 1.6V XT = OFF X = OFF
A
ICC Power Cut Mode (WITH PMC function ) - 2
35 A
Ta 50C
35 6 30 800 200
STOP
-
600
Ta 50C
Note1 : Typical values are value that when Ta = 25C and Vcc = 3.3 V unless otherwise noted. Note2 : ICC measurement conditions (NORMAL, SLOW): All functions are operational; output pins except bus pin are open, and input pins are fixed. Bus pin CL=50pF (Access toexternal memory at 8-waitsetting ) Note3: This data shows exept "debug mode"
92CF26A-660
2007-11-21
TMP92CF26A
4.3
AC Characteristics
The Following all AC regulation is the measurement result in following condition, if unless otherwise noted. AC measuring condition
*
Clock of top column in above table shows system clock frequency, and "T" shows system clock period [ns]. Output level: High = 0.7 x 3AVCC, Low = 0.3 x 3AVCC Input level: High = 0.9 x 3AVCC, Low = 0.1 x 3AVCC
* *
Note: In table, "Variable" shows the regulation at DVCC3A=3.0V3.6V, DVCC1A=DVCC1B=DVCC1C=1.41.6V.
4.3.1
Basic Bus Cycle
Read cycle Variable Min Max
166.6 2666 - 12.5 3.25 3.25 2.0T - 18.0 6.0T - 18.0 8.0T - 18.0 1.5T - 18.0 5.5T - 18.0 7.5T - 18.0 1.5T - 10 5.5T - 10 7.5T - 10 0.5T - 5 0.5T - 5 0 0 20 2 1.5T - 18.0 5.5T - 18.0 7.5T - 18.0 0.5T - 5 7 - 82 0.75 - 75.75 8.75 58.75 83.75 1.25 1.25 0 0 20 2 0.75 50.75 75.75 1.25 - 16.6 5.3 5.3 15.3 82 - 7 73.6 - 14.9 81.3 115.0 3.3 3.3 0 0 20 2 7 73.6 107.0 3.3 ns 100 12.5 0.5T - 3 0.5T - 3
No.
Parameter
Symbol
tOSC tCYC tCL tCH tAD tAD4 tAD6 tRD tRD4 tRD6 tRR tRR4 tRR6 tAR tRK tHA tHR tTK tKT tSBA tSBA4 tSBA6 tRRH
80 MHz 60 MHz Unit
1 OSC period (X1/X2) 2 System clock period ( = T) 3 SDCLK low width 4 SDCLK high width 5-1 5-2 A0 ~ A23 valid D0 ~ D15 input at 0 waits A0 ~ A23 valid D0 ~ D15 input at 4 waits/6 waits
RD falling
6-1 RD falling D0 ~ D15 input at 0 waits 6-2 D0 ~ D15 input at 4 waits/6waits
7-1 RD low width at 0 waits 7-2
RD low width at 4 waits/6waits
8 A0 ~ A23 valid RD falling 9 RD falling SDCLK rising 10 A0 ~ A23 valid D0 ~ D15 hold 11 RD rising D0 ~ D15 hold 12 13
WAIT setup time
WAIT hold time
14-1 Data byte control access time at 0wait 14-2 Data byte control access time at 4waits/6waits
15 RD high width
AC measuring condition * Data_bus, Address_bus, various function control signal capacitance CL = 50 pF
Note: The operation guarantee temperature: 80MHz: Ta = 0 to 50C, less than 60MHz: Ta =0 to 70C
92CF26A-661
2007-11-21
TMP92CF26A
Write cycle No.
16-1 16-2 17-1 17-2
Parameter
D0 ~ D15 valid WR xx rising at 0 waits D0 ~ D15 valid WR xx rising at 2 waits/4 waits
WR xx low width at 0 waits
Symbol
tDW tDW tDW2 tDW4 tWW tWW tWW2 tWW4 tAW tWK tWA tWD tRDO tRDO tSWP tSWP tSWP2 tSWP4 tSBW tSBW tSBW2 tSBW4 tSAS tSWR tSDS tSDS tSDS2 tSDS4 tSDH
Variable Min
1.0T - 10.0 1.0T - 6.0 3.0T - 10.0 5.0T - 6.0 1.0T - 7.0 1.0T - 4.0 3.0T - 7.0 5.0T - 4.0 0.5T - 5.0 0.5T - 5.0 0.5T - 5.0 0.5T - 5.0 0.5T - 2.0 0.5T - 1.0 1.0T - 7.0 1.0T - 4.0 3.0T - 7.0 5.0T - 4.0 1.0T - 7.0 1.0T - 4.0 3.0T - 7.0 5.0T - 4.0 0.5T - 5.0 0.5T - 5.0 1.0T - 10.0 1.0T - 6.0 3.0T - 10.0 5.0T - 6.0 0.5T - 5.0
80MHz 60MHz
- 6.5 - 56.5 - 8.5 - 58.5 1.25 1.25 1.25 1.25 - 5.25 - 8.5 - 58.5 - 8.5 - 58.5 1.25 1.25 - 6.5 - 56.5 1.25 6.6 - 39.8 - 9.6 - 42.8 - 3.3 3.3 3.3 3.3 6.3 - 9.6 - 43.0 - 9.6 - 43.0 - 3.3 3.3 6.6 - 40.0 - 3.3
Unit
Max
WR xx low width at 2 waits/4 waits
18 A0 ~ A23 valid WR falling 19 20 21
WR xx falling SDCLK rising WR xx rising A0 ~ A23 hold WR xx rising D0 ~ D15 hold
22 RD rising D0 ~ D15 output 23-1 Write width for SRAM 23-2 Write width for SRAM at 2waits/4waits Data byte control ~ end of write 24-1 for SRAM 24-2 Data byte control ~ end of write for SRAM at 2waits/4waits
ns
25 Address setup time for SRAM 26 Write recovery time for SRAM 27-1 Data setup time for SRAM 27-2 Data setup time for SRAM at 2waits/4waits
28 Data hold time for SRAM
AC measuring condition
Note: The operation guarantee Temperature: 80MHz: Ta=050C, less than 60MHz: Ta=070C
92CF26A-662
2007-11-21
TMP92CF26A
(1) Read cycle (0 waits)
tOSC X1 tCYC tCL SDCLK tCH
tTK
WAIT
tKT
A0~A23
tAD
CSn
tHA R/ W tAR
RD
tRK
tHR tRR tRD Data input
tRRH
D0~D15
tSBA
SRxxB
SRWR
Note1: The phase relation between X1 input signal and the other signals is undefined. Note2: The above timing chart show an example of basic bus timing. The CSn , R/ W , RD , WRxx , SRxxB , SRWR
pins timing can be adjusted by memory controller timing adjust function.
92CF26A-663
2007-11-21
TMP92CF26A
(2) Write cycle (0 waits)
tOSC X1 tCYC tCL SDCLK tCH
tTK
WAIT
tKT
A0~A23
CSn
R/ W tAW
WRxx
tWK
tWA
tWW tDW D0~D15 Data output
tSWR tWD
tRDO
RD
tSDH tSBW
SRxxB
tSDS tSAS tSWP
SRWR
Note1: The phase relation between X1 input signal and the other signals is undefined. Note2: The above timing chart show an example of basic bus timing. The CSn , R/ W , RD , WRxx , SRxxB , SRWR pins timing can be adjusted by memory controller timing adjust function.
92CF26A-664
2007-11-21
TMP92CF26A
(3) Read cycle (1 wait)
SDCLK
WAIT
A0~A23 tAD3
CSn
R/ W
RD
tRR3 tRD3 D0~D15 Data input
(4) Write cycle (1 wait)
SDCLK
WAIT
A0~A23
CSn
R/ W
WRxx
tWW3 tDW3 D0~D15 tRDO
RD
Data output
92CF26A-665
2007-11-21
TMP92CF26A 4.3.2 Page ROM Read Cycle
(1) 3-2-2-2 mode No. Parameter Symbol Min
1 System clock period ( = T) 2 A0, A1 3 A2 ~ A23 4 RD falling 6 RD rising
D0 ~ D15 input D0 ~ D15 input D0 ~ D15 input D0 ~ D15 hold
Variable Max
266.6 2.0T - 18 3.0T - 18 2.5T - 18 0 0 12.5
80 MHz 60 MHz Unit
12.5 7 19.5 13 0 0 16.6 15.2 31.8 24 0 0 ns
tCYC tAD2 tAD3 tRD3 tHA tHR
5 A0 ~ A23 Invalid D0 ~ D15 hold
AC measuring condition
Note: The (a), (b) and (c) of "Symbol" in above table depend on the falling timing of RD pin. The falling timing of RD pin is set by MEMCR0 in memory controller. If MEMCR0 is set to "00", it correspond with (a) in above table, and "01" is (b), "10" is (c).
SDCLK tCYC
A0~A23
+0
+1
+2
+3
CS2
tAD3
RD
tAD2
tAD2
tAD2
tHA
tRD3 D0~D15
Data input
tHA
Data input
tHA
Data input
tHA
Data input
tHR
Page Mode Access Timing (when using a 8-byte page size example)
92CF26A-666
2007-11-21
TMP92CF26A 4.3.3
No.
1 2 3
SDRAM controller AC Characteristics
Parameter Symbol
tRC tRAS tRCD tRP tRRD tWR tCK tCH tCL tAC tAC tHR tDS tDS tDH tDH tDH tAS tAH tCKS tCMS tCMH tRSC 0 0.5T - 4 0.5T - 4 T - 10 0.5T - 6 0.5T - 4 0.5T - 4 0.5T - 6 0.5T - 4 0.5T - 5 0.5T - 3 0.5T - 5 0.5T - 3 0.5T - 6 0.5T - 4 T T 7T 2T 7T T 2T T 2T 3T 7T T 2T T 0.5T - 5 0.5T - 3 0.5T - 5 0.5T - 3 T - 16 T - 16 T - 6.5 T - 6.5 12210
Variable Min Max
80 MHz 60 MHz
12.5 87.5 25.0 87.5 12.5 25.0 12.5 25.0 37.5 87.5 12.5 25.0 12.5
-
Unit
Ref/Active to ref/active command period Active to precharge command period Active to read/write command delay time
=000 =110 =000 =110 =0 =1 =0 =1 =000 =110 =0 =1
16.6 116.2 33.2 116.2 16.6 33.2 16.6 33.2 49.8 116.2 16.6 33.2 16.6 3.3
-
Precharge to active 4 command period Active to active 5 command period 6 Write recovery time 7 CLK cycle time 8 CLK high level width 9 CLK low level width
3.25
-
3.3
-
3.25
-
10-1a Access time from CLK(CL* =2) 10-1b =0(Read data shift OFF) 10-2a Access time from CLK(CL* =2) 10-2b =1(Read data shift ON) 11 Data hold time from internal read 12 Data-in set-up time 1Word/Single Burst 1Word/Single 13 Data-in hold time Burst 14 Address set-up time 15 Address hold time 16 CKE set-up time 17 Command set-up time 18 Command hold time 19 Mode register set cycle time
0.6
-
- 3.5
-
ns
10.1
-
6 0 2.25 2.25 2.5
-
0 3.3 3.3 6.6 2.3
-
2.25 2.25
-
4.3 2.3
-
2.25
-
3.3
-
3.25
-
3.3
-
3.25
-
2.3
-
2.25 12.5
16.6
*CL: CAS latency AC measuring condition SDCLK pin CL = 30 pF, Other pins CL = 50 pF
92CF26A-667
2007-11-21
TMP92CF26A
(1) SDRAM read timing (1Word length read mode, =1)
tCK SDCLK tCH SDxxDQM tCMS
SDCS
tCL
tRCD
tRAS
tRP
tCMS tCMH
tCMH
SDRAS
tRRD
SDCAS
SDWE
tAS A0~A9 Row
tAH Column tAS tAH
A10
Row
A11~A15
Row tAC tOH Data input
D0~D15
92CF26A-668
2007-11-21
TMP92CF26A
(2) SDRAM write timing (Single write mode, =1)
tCK SDCLK tCH SDxxDQM tCMS
SDCS
tCL
tRCD tCMS
tWR
tRP
tRRD
tCMH
SDRAS
tCMH
SDCAS
tRAS
SDWE
tAS A0~A9 Row
tAH Column tAS tAH
A10
Row
A11~A15
Row tDS tDH Data output
D0~D15
92CF26A-669
2007-11-21
TMP92CF26A
(3) SDRAM burst read timing (Start burst cycle)
tCK SDCLK tCMS SDxxDQM tMRD
SDCS
tRCD
tCMS
SDRAS
tCMH
tCMS tCMH
SDCAS
tCMH
SDWE
tAS A0~A9 027
tAH
tAS Row
tAH
tAS Column
A10
Row
A11~A15
0
Row tAC tAC Data input tHR tAC Data input tHR Data input
D0~D15
92CF26A-670
2007-11-21
TMP92CF26A
(4) SDRAM burst read timing (End burst timing)
tCK SDCLK tCMH SDxxDQM tCMS
SDCS
tCMS
tRP
tCMH
tCMS
tCMH
SDRAS
SDCAS
SDWE
A0~A9
Column tAS
A10
A11~A15
Row tAC
D0~D15
Data input tHR
Data input tHR
92CF26A-671
2007-11-21
TMP92CF26A
(5) SDRAM initializes timing
tCK SDCLK tRC SDxxDQM tCMS
SDCS
SDRAS
tCMS
SDCAS
tCMH
tCMS
tCMH
tCMS
tCMH
tCMH
SDWE
A0~A9 tAS A10 tAH
220
A11~A15
0
92CF26A-672
2007-11-21
TMP92CF26A
(6) SDRAM refreshes timing
tCK SDCLK tRC SDxxDQM tCMS
SDCS
tCMH
SDRAS
SDCAS
SDWE
(7) SDRAM self refresh timing
tCK SDCLK tCKS SDCKE tCKS tRC
SDxxDQM tCMS
SDCS
tCMH
SDRAS
SDCAS
SDWE
92CF26A-673
2007-11-21
TMP92CF26A 4.3.4 NAND Flash Controller AC Characteristics
Variable No. Symbol
1 2 3 4 5 6 7 tNC tRP tREA tOH tWP tDS tDH Access cycle
NDRE low level width
NDRE data access time
Parameter Min
(2 + n + m ) T (1.5 + n) T - 12 (1.5 + n) T - 15 0 (1.0 + n) T - 20 (1.0 + n) T - 20 (0.5 + m) T - 2
Max
80 MHz (n=3) (m=3)
100 45 41 0 30 30 42
60 MHz (n=3) (m=3)
132 63 60
Unit
ns Read data hold time
NDWE low level width
0 47 47 56
Write data setup time Write data hold time
AC measuring condition
Note1: The "n" in "Variable" means wait-number which is set to NDFMCR0, and "m" means number which is set to DFMCR0. Example: If NDFMCR0 is set to "01", n = 1, tRP = (1.5 + n) T - 12 = 2.5T - 12 Note2: In above variable, the setting that result is minus can not use. tCYC SPLW1:0 = "01" SDCLK SPHW1:0 = "01"
A0~A23 tRP
NDRE
Read cycle
NDWE
tREA tOH D0~D7 D0~D15 Data input
NDRE
tWP Write cycle
NDWE
tDS D0~D7 D0~D15 Data output
tDH
92CF26A-674
2007-11-21
TMP92CF26A 4.3.5 Serial channel timing
(1) SCLK input mode (I/O interface mode) Parameter
SCLK cycle Output data SCLK rising/ falling SCLK rising/ falling Output data hold SCLK rising/ falling Input data hold SCLK rising/ falling Input data valid Input data valid SCLK rising/ falling
Symbol Min
tSCY tOSS tOHS tHSR tSRD tRDS 20 16T
Variable Max
80 MHz 60 MHz Unit
200 20 105 35 266 36.4 146 43 246 20 ns
tSCY/2 - 4T - 30 tSCY/2 + 2T -20 2T + 10 tSCY - 20
180 20
(2) SCLK output mode (I/O interface mode) Parameter
SCLK cycle (Programmable) Output data SCLK rising/ falling SCLK rising/ falling Output data hold SCLK rising/ falling Input data hold SCLK rising/ falling Input data valid Input data valid SCLK rising/ falling
Symbol Min
tSCY tOSS tOHS tHSR tSRD tRDS 1T + 50 16T
Variable Max
8192T
80 MHz 60 MHz Unit
200 60 60 0 266 93 93 0 199 66 ns
tSCY/2 - 40 tSCY/2 - 40 0 tSCY - 1T - 50
137.5 62.5
SCLK Output mode/ Input rising mode SCLK (Input falling mode) Output data TXD
tSCY
tOSS 0
tOHS 1 tSRD tRDS tHSR 1 Valid 2 Valid 3 Valid 2 3
Input data RXD
0 Valid
92CF26A-675
2007-11-21
TMP92CF26A 4.3.6 Timer input pulse (TA0IN, TA2IN, TB0IN0, TB1IN0)
Parameter
Clock cycle Low level pulse width High level pulse width
Symbol Min
tVCK tVCKL tVCKH 8T+100 4T + 40 4T + 40
Variable Max
80 MHz 60 MHz Unit
200 90 90 234 107 107 ns
4.3.7
Interrupt Operation
Parameter Symbol Min
tINTAL tINTAH 2T + 40 2T + 40
Variable Max
80 MHz 60 MHz Unit
65 65 74 74 ns
INT0~INT7 low width INT0~INT7 high width
4.3.8
USB Timing (Full-speed)
VCC = 3.3 0.3 V/fUSB = 48 MHz/Ta = 0 ~ 70C Parameter Symbol
tR tF VCRS
Min
4 4 1.3
Max
20 20 2.0
Unit
ns V
D+, D- rising time D+, D- falling time Output signal crossover voltage
AC measuring condition
TMP92CF26A D+ D- R1 = 27 R1 = 27 Measuring positoin VCC R3 = 1.5 k
R2 = 15 k CL = 50 pF
D+, D-
VCRS
90% 10%
90% 10%
tR
tF
92CF26A-676
2007-11-21
TMP92CF26A 4.3.9 LCD Controller
Parameter
LCP0 clock period LCP0 high width (Include phase inversion) LCP0 low width (Include phase inversion) Data valid LCP0 falling (Include phase inversion) LCP0 falling Data hold (Include phase inversion) Signal delay from LCP0 basic changing point (Include phase inversion)
Symbol Min
tCW tCWH tCWL tDSU tDHD 2T(n+1) T(n+1) - 5 T(n+1) - 5
Variable Max
80 MHz (n=0)
25 7.5 7.5 5 5
60 MHz (n=0)
33.3 11.6 11.6 9.1 9.1
Unit
T(n+1) - 7.5 T(n+1) - 7.5
ns
tGDL
-20
20
20
20
tCW LCP0 tCWH tCWL
tDSU LD0~LD23 LDINV
tDHD
LD0~LD23 out LDINV
LVSYNC LHSYNC FR LLOAD LGOE0 LGOE1 LGOE2
tGDL
AC measuring condition * CL = 50 pF (LCP0 only CL = 30 pF)
Note: The "n" in "Variable" show value that is set to LCDMODE0. Example: If LCDMODE0 = "01", n=1, tRWP = 2T(n+1) = 2T
92CF26A-677
2007-11-21
TMP92CF26A 4.3.10 I2S Timing
Parameter
I2SCKO clock period I2SCKO high width I2SCKO low width I2SDO, I2SWS setup time I2SDO, I2SWS hold time
Symbol Min
tCR tHB tLB tSD tHD tIC
Variable Max
80 MHz 60 MHz Unit
100 35 35 35 42 100 35 35 35 42 ns
0.5 tCR - 15 0.5 tCR - 15 0.5 tCR - 15 0.5 tCR - 8
tCR tLB I2SCKO tHD I2SDO tSD tHD tHB
I2SWS
Note: The Maximum operation frequency of I2SCKO in I S circuit is 10MHz. Don't set I2SCKO to value more than 10MHz.
2
AC measuring condition * I2SCKO, I2SDO and I2SWS pins CL = 30 pF
92CF26A-678
2007-11-21
TMP92CF26A 4.3.11 SPI Controller
Variable Min
SPCLK frequency ( = 1/S) SPCLK rising time SPCLK falling time SPCLK low width SPCLK high width Output data valid SPCLK rising/falling SPCLK rising/ falling Output data hold Input data valid SPCLK rising/ falling SPCLK rising/ falling Input data valid fPP tr tf tWL tWH tODS tODH tIDS tIDH 0.5S - 6 0.5S - 6 0.5S - 18 0.5S - 10 5 5
Parameter
Symbol
80 MHz 60 MHz Max
20 6 6 20 6 6 19 19 7 15 5 5 15 6 6 28 28 15
Unit
MHz
ns 23.4 5 5
AC measuring condition *Clock of top column in above table shows system clock frequency, and "S" in "Variable" show SPCLK clock cycle [ns]. * CL = 25 pF
fPP SPCLK Output (at SPIMD = "11") SPCLK Output (at SPIMD = "00")
tr
0.7 VCC 0.2VCC
tf
tWL
tWH
tODS
tODH
SPDO Output
tIDS
tIDH
SPDI Input
92CF26A-679
2007-11-21
TMP92CF26A
4.4
AD Conversion Characteristics
Parameter Symbol
VREFH VREFL AVCC AVSS AVIN IREFON IREFOFF ET = 1 = 0 Conversion speed at 12S
Condition
Min
AVCC - 0.2 DVSS DVCC3A/3B DVSS VREFL
Typ.
AVCC DVSS DVCC3A/3B DVSS 0.38 1
2.0
Max
AVCC DVSS + 0.2 DVCC3A/3B DVSS VREFH 0.45 5
4.0
Unit
Analog reference voltage (+) Analog reference voltage (-) AD converter power supply voltage AD converter ground Analog input voltage Analog current for analog reference voltage Total error (Quantize error of 0.5 LSB is included)
V
mA
A
LSB
Note1: 1 LSB = (VREFH-VREFL)/1024[V] Note2: Minimum frequency for operation Minimum clock for AD converter operate is 3MHz. (Clock frequency that is seleted by Clock gear fSYS = 3MHz) Note3: The power supply current from AVCC pin is included in the power supply current of VCC pin (ICC).
92CF26A-680
2007-11-21
TMP92CF26A
4.5
Recommended Oscillation Circuit
The TMP92CF26A has been evaluated by the oscillator vender below. Use this information when selecting external parts.
Note: The total load value of the oscillator is the sum of external loads (C1 and C2) and the floating load of the actual assembled board. There is a possibility of operating error when using C1 and C2 values in the table below. When designing the board, design the minimum length pattern around the oscillator. We also recommend that oscillator evaluation be carried out using the actual board.
(1)
Connection example
X1 Rf Rd Rd X2 XT1 XT2
C1
C2
C1
C2
High-frequency oscillator
Low-frequency oscillator
(2)
Recommended ceramic oscillator: Murata Manufacturing Co., Ltd.
MCU
Oscillation Frequency Type [MHZ] 6.00 Lead SMD Lead SMD 12.00 SMD
Oscillator Product Number CSTLS6M00G53-B0 CSTCR6M00G53-R0 CSTLS10M0G53-B0 CSTCE10M0G52-R0 CSTCE12M0G52-R0
Parameter of Elements C1 [pF] (15) (15) (15) (10) (10) C2 [pF] (15) (15) (15) (10) (10) 0 Open Rd [] Rf []
Running Condition Voltage [V] TC [C]
TMP92CF26AXBG
10.00
1.4 1.6
-20 +80
Note 1: The figure in parentheses ( ) under C1 and C2 is the built-in condenser type. Note 2: The product numbers and specifications of the oscillators made by Murata Manufacturing Co., Ltd. are subject to change. For up-to-date information, please refer to the following URL: http://www.murata.co.jp
92CF26A-681
2007-11-21
TMP92CF26A
5.
Table of Special function registers (SFRs)
The SFRs include the I/O ports and peripheral control registers allocated to the 8-Kbyte address space from 000000H to 001FF0H.
(1) I/O Port (2) Interrupt control (3) Memory controller (4) TSI(Touch screen I/F) (5) SDRAM controller (6) LCD controller (7) PMC (8) USB controller (9) SPI controller (10) MMU (11) NAND-Flash controller (12) DMA controller
(13) Clock gear, PLL (14) 8-bit timer (15) 16-bit timer (16) SIO (17) SBI (18) AD converter (19) Watchdog timer (20)RTC(Real time clock) (21)MLD(Melody/alarm generator) (22)I2S (23) MAC
Table layout Symbol Name Address 7 6 1 0
Bit Symbol Read/Write Initial value System Reset State Initial value HOT Reset State Remarks Note: "Prohibit RMW" in the table means that you cannot use RMW instructions on these register. Example: When setting bit0 only of the register PxCR, the instruction "SET 0, (PxCR)" cannot be used. The LD (transfer) instruction must be used to write all eight bits.
Read/Write R/W: R: W: W*: Prohibit RMW: Both read and write are possible. Only read is possible. Only write is possible. Both read and write are possible (when this bit is read as1) Read modify write instructions are prohibited. (The EX, ADD, ADC, BUS, SBC, INC, DEC, AND, OR, XOR, STCF, RES, SET, CHG, TSET, RLC, RRC, RL, RR, SLA, SRA, SLL, SRL, RLD and RRD instruction are read modify write instructions.) Read modify write is prohibited when controlling the pull-up resistor.
R/W*:
92CF26A-682
2007-11-21
TMP92CF26A
Table 5.1 I/O Register Address Map [1] Port (1/2) Address
0000H 1H 2H 3H 4H P1 5H 6H P1CR 7H P1FC 8H 9H AH BH CH DH EH FH
Name
Address
0010H P4 1H 2H
Name
Address
0020H P8
Name
Address
0030H PC 1H
Name
1H P8FC2 2H 3H P8FC 4H P9 5H P9FC2 6H P9CR 7H P9FC 8H PA 9H AH BH PAFC CH DH EH FH
2H PCCR 3H PCFC 4H 5H 6H 7H 8H 9H AH BH CH PF DH EH PFCR FH PFFC
3H P4FC 4H P5 5H 6H 7H P5FC 8H P6 9H AH P6CR BH P6FC CH P7 DH EH P7CR FH P7FC
Address
0040H PG 1H 2H
Name
Address
0050H PK 1H 2H
Name
Address
0060H PP 1H
Name
Address
Name
0070H Reserved 1H Reserved 2H Reserved 3H Reserved 4H Reserved 5H Reserved 6H Reserved 7H Reserved 8H Reserved 9H Reserved AH Reserved BH Reserved CH Reserved DH Reserved EH Reserved FH Reserved
2H PPCR 3H PPFC 4H PR 5H 6H PRCR 7H PRFC 8H PZ 9H AH PZCR BH CH DH EH FH
3H PGFC 4H 5H 6H 7H 8H 9H AH BH CH PJ DH EH PJCR FH PJFC
3H PKFC 4H PL 5H 6H 7H PLFC 8H PM 9H AH BH PMFC CH PN DH EH PNCR FH PNFC
Note: Do not access no allocated name address.
92CF26A-683
2007-11-21
TMP92CF26A
[1] Port (2/2) Address
0080H 1H P1DR 2H 3H 4H P4DR 5H P5DR 6H P6DR 7H P7DR 8H P8DR 9H P9DR AH PADR BH CH PCDR DH EH FH PFDR
Name
Address
1H 2H
Name
Address
00A0H PT 1H
Name
Address
00B0H PX 1H
Name
0090H PGDR
2H PTCR 3H PTFC 4H PU 5H 6H PUCR 7H PUFC 8H PV 9H PVFC2 AH PVCR BH PVFC CH PW DH EH PWCR FH PWFC
2H PXCR 3H PXFC 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
3H PJDR 4H PKDR 5H PLDR 6H PMDR 7H PNDR 8H PPDR 9H PRDR AH PZDR BH PTDR CH PUDR DH PVDR EH PWDR FH PXDR
Note: Do not access no allocated name address.
92CF26A-684
2007-11-21
TMP92CF26A
[2] INTC Address Name Address Name Address Name Address Name
00D0H INTE12 1H INTE34 2H INTE56 3H INTE7 4H INTETA01 5H INTETA23 6H INTETA45 7H INTETA67 8H INTETB0 9H INTETB1 AH BH INTES0 CH DH EH FH 00E0H INTESBIADM 1H INTESPI 2H Reserved 3H INTEUSB 4H Reserved 5H INTEALM 6H Reserved 7H 8H INTERTC 9H INTEKEY AH INTELCD BH INTEI2S01 CH INTENDFC DH Reserved EH INTEP0 FH INTEAD 00F0H INTE0 1H INTETC01 /INTEDMA01 2H INTETC23 /INTEDMA23 3H INTETC45 /INTEDMA45 4H INTETC67 5H SIMC 6H IIMC0 7H INTWDT 8H INTCLR 9H AH IIMC1 BH CH DH EH FH Reserved 4H DMA4V 5H DMA5V 6H DMA6V 7H DMA7V 8H DMAB 9H DMAR AH DMASEL BH CH DH EH FH 3H DMA3V 2H DMA2V 0100H DMA0V 1H DMA1V
[3] MEMC Address Name Address
0150H 1H 2H 3H 4H 5H 6H 7H 8H BEXCSL 9H BEXCSH AH BH CH DH EH FH
[4] TSI Name Address
0160H 1H 2H 3H 4H 5H 6H PMEMCR 7H 8H CSTMGCR 9H WRTMGCR AH RDTMGCR0 BH RDTMGCR1 CH BROMCR DH RAMCR EH FH
Name
Address
Name
0140H B0CSL 1H B0CSH 2H MAMR0 3H MSAR0 4H B1CSL 5H B1CSH 6H MAMR1 7H MSAR1 8H B2CSL 9H B2CSH AH MAMR2 BH MSAR2 CH B3CSL DH B3CSH EH MAMR3 FH MSAR3
01F0H TSICR0 1H TSICR1 2H Reserved 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Note: Do not access no allocated name address.
92CF26A-685
2007-11-21
TMP92CF26A
[5] SDRAMC Address Name
0250H SDACR 1H SDCISR 2H SDRCR 3H SDCMM 4H SDBLS 5H 6H 7H 8H 9H AH BH CH DH EH FH
[6] LCDC Address Name Address Name Address Name
0280H LCDMODE0 1H LCDMODE1 2H 3H LCDDVM0 4H LCDSIZE 5H LCDCTL0 6H LCDCTL1 7H LCDCTL2 8H LCDDVM1 9H AH LCDHSP BH LCDHSP CH LCDVSP DH LCDVSP EH LCDPRVSP FH LCDHSDLY 0290H LCDHSDLY 1H LCDO0DLY 2H LCDO1DLY 3H LCDO2DLY 4H LCDHSW 5H LCDLDW 6H LCDHO0W 7H LCDHO1W 8H LCDHO2SW 9H LCDHWB8 AH BH CH DH EH FH 02A0H LSAML 1H LSAMM 2H LSAMH 3H 4H LSASL 5H LSASM 6H LSASH 7H 8H LSAHX 9H LSAHX AH LSAHY BH LSAHY CH LSASS DH LSASS EH LSACS FH LSACS
[7] PMC Address
1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Name
02F0H PMCCTL
Note: Do not access no allocated name address.
92CF26A-686
2007-11-21
TMP92CF26A
[8] USBC (1/2) Address
to
Name
RAM
Address
Name
Address
Name
Address
07A0H
Name
0500H Descriptor 067FH (384 byte)
0780H ENDPOINT0 1H ENDPOINT1 2H ENDPOINT2 3H ENDPOINT3 4H 5H 6H 7H 8H 9H EP1_MODE AH EP2_MODE BH EP3_MODE CH DH EH FH
0790H EP0_STATUS 1H EP1_STATUS 2H EP2_STATUS 3H EP3_STATUS 4H 5H 6H 7H 8H EP0_SIZE_L_A 9H EP1_SIZE_L_A AH EP2_SIZE_L_A BH EP3_SIZE_L_A CH DH EH FH
1H EP1_SIZE_L_B 2H EP2_SIZE_L_B 3H EP3_SIZE_L_B 4H 5H 6H 7H 8H Reserved 9H EP1_SIZE_H_A AH EP2_SIZE_H_A BH EP3_SIZE_H_A CH DH EH FH
Address
07B0H
Name
Address
Name
Address
Name
07C0H bmRequestType 1H bRequest 2H wValue_L 3H wValue_H 4H wIndex_L 5H wIndex_H 6H wLength_L 7H wLength_H 8H SetupReceived 9H Current_Config AH Standard Request BH Request CH DATASET1 DH DATASET2 EH USB STATE FH EOP
07D0H COMMAND 1H EPx_SINGLE1 2H Reserved 3H EPx_BCS1 4H Reserved 5H Reserved 6H INT_Control 7H Reserved 8H Standard Request Mode 9H Request Mode AH Reserved BH Reserved CH Reserved DH Reserved EH ID_CONTROL FH ID_STATE
1H EP1_SIZE_H_B 2H EP2_SIZE_H_B 3H EP3_SIZE_H_B 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Note: Do not access no allocated name address.
92CF26A-687
2007-11-21
TMP92CF26A
[8] USBC (2/2) Address Name Address Name
07E0H Port Status 1H FRAME_L 2H FRAME_H 3H ADDRESS 4H Reserved 5H Reserved 6H USBREADY 7H Reserved 8H Set Descriptor STALL 9H AH BH CH DH EH FH 07F0H USBINTFR1 1H USBINTFR2 2H USBINTFR3 3H USBINTFR4 4H USBINTMR1 5H USBINTMR2 6H USBINTMR3 7H USBINTMR4 8H USBCR1 9H AH BH CH DH EH FH
Note: Do not access no allocated name address.
92CF26A-688
2007-11-21
TMP92CF26A
[9] SPIC Address Name Address Name
0820H SPIMD 1H SPIMD 2H SPICT 3H SPICT 4H SPIST 5H SPIST 6H SPICR 7H SPICR 8H 9H AH BH CH SPIIE DH SPIIE EH FH 0830H SPITD0 1H SPITD0 2H SPITD1 3H SPITD1 4H SPIRD0 5H SPIRD0 6H SPIRD1 7H SPIRD1 8H 9H AH BH CH DH EH FH
[10] MMU Address Name Address Name Address Name Address Name
0880H LOCALPX 1H LOCALPX 2H LOCALPY 3H LOCALPY 4H LOCALPZ 5H LOCALPZ 6H 7H 8H LOCALLX 9H LOCALLX AH LOCALLY BH LOCALLY CH LOCALLZ DH LOCALLZ EH FH 0890H LOCALRX 1H LOCALRX 2H LOCALRY 3H LOCALRY 4H LOCALRZ 5H LOCALRZ 6H 7H 8H LOCALWX 9H LOCALWX AH LOCALWY BH LOCALWY CH LOCALWZ DH LOCALWZ EH FH 08A0H LOCALESX 1H LOCALESX 2H LOCALESY 3H LOCALESY 4H LOCALESZ 5H LOCALESZ 6H 7H 8H LOCALEDX 9H LOCALEDX AH LOCALEDY BH LOCALEDY CH LOCALEDZ DH LOCALEDZ EH FH 08B0H LOCALOSX 1H LOCALOSX 2H LOCALOSY 3H LOCALOSY 4H LOCALOSZ 5H LOCALOSZ 6H 7H 8H LOCALODX 9H LOCALODX AH LOCALODY BH LOCALODY CH LOCALODZ DH LOCALODZ EH FH
Note: Do not access no allocated name address.
92CF26A-689
2007-11-21
TMP92CF26A
[11] NAND-Flash controller Address Name Address Name Address Name
08C0H NDFMCR0 1H NDFMCR0 2H NDFMCR1 3H NDFMCR1 4H NDECCRD0 5H NDECCRD0 6H NDECCRD1 7H NDECCRD1 8H NDECCRD2 9H NDECCRD2 AH NDECCRD3 BH NDECCRD3 CH NDECCRD4 DH NDECCRD4 EH FH 08D0H NDRSCA0 1H NDRSCA0 2H NDRSCD0 3H 4H NDRSCA1 5H NDRSCA1 6H NDRSCD1 7H 8H NDRSCA2 9H NDRSCA2 AH NDRSCD2 BH CH NDRSCA3 DH NDRSCA3 EH NDRSCD3 FH 1FF0H NDFDTR0 1H NDFDTR0 2H NDFDTR1 3H NDFDTR1 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
Note: Do not access no allocated name address.
92CF26A-690
2007-11-21
TMP92CF26A
[12] DMAC Address Name Address Name Address Name Address Name
0900H HDMAS0 1H HDMAS0 2H HDMAS0 3H 4H HDMAD0 5H HDMAD0 6H HDMAD0 7H 8H HDMACA0 9H HDMACA0 AH HDMACB0 BH HDMACB0 CH HDMAM0 DH EH FH 0910H HDMAS1 1H HDMAS1 2H HDMAS1 3H 4H HDMAD1 5H HDMAD1 6H HDMAD1 7H 8H HDMACA1 9H HDMACA1 AH HDMACB1 BH HDMACB1 CH HDMAM1 DH EH FH 0920H HDMAS2 1H HDMAS2 2H HDMAS2 3H 4H HDMAD2 5H HDMAD2 6H HDMAD2 7H 8H HDMACA2 9H HDMACA2 AH HDMACB2 BH HDMACB2 CH HDMAM2 DH EH FH 0930H HDMAS3 1H HDMAS3 2H HDMAS3 3H 4H HDMAD3 5H HDMAD3 6H HDMAD3 7H 8H HDMACA3 9H HDMACA3 AH HDMACB3 BH HDMACB3 CH HDMAM3 DH EH FH
Address
Name
Address
Name
Address
0970H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Name
0940H HDMAS4 1H HDMAS4 2H HDMAS4 3H 4H HDMAD4 5H HDMAD4 6H HDMAD4 7H 8H HDMACA4 9H HDMACA4 AH HDMACB4 BH HDMACB4 CH HDMAM4 DH EH FH
0950H HDMAS5 1H HDMAS5 2H HDMAS5 3H 4H HDMAD5 5H HDMAD5 6H HDMAD5 7H 8H HDMACA5 9H HDMACA5 AH HDMACB5 BH HDMACB5 CH HDMAM5 DH EH FH
CH Reserved DH Reserved EH HDMAE FH HDMATR
Note: Do not access no allocated name address.
92CF26A-691
2007-11-21
TMP92CF26A
[13] CGEAR, PLL Address Name
10E0H SYSCR0 1H SYSCR1 2H SYSCR2 3H EMCCR0 4H EMCCR1 5H EMCCR2 6H Reserved 7H 8H PLLCR0 9H PLLCR1 AH BH CH DH EH FH
[14] 8-bit timer Address
1H 2H TA0REG 3H TA1REG 4H TA01MOD 5H TA1FFCR 6H 7H 8H TA23RUN 9H AH TA2REG BH TA3REG CH TA23MOD DH TA3FFCR EH FH
Name
Address
1H
Name
1100H TA01RUN
1110H TA45RUN 2H TA4REG 3H TA5REG 4H TA45MOD 5H TA5FFCR 6H 7H 8H TA67RUN 9H AH TA6REG BH TA7REG CH TA67MOD DH TA7FFCR EH FH
[15] 16-bit timer Address
1H 2H TB0MOD 3H TB0FFCR 4H 5H 6H 7H 8H TB0RG0L 9H TB0RG0H AH TB0RG1L BH TB0RG1H CH TB0CP0L DH TB0CP0H EH TB0CP1L FH TB0CP1H
[16] SIO Address
1H 2H TB1MOD 3H TB1FFCR 4H 5H 6H 7H 8H TB1RG0L 9H TB1RG0H AH TB1RG1L BH TB1RG1H CH TB1CP0L DH TB1CP0H EH TB1CP1L FH TB1CP1H
[17] SBI Name Address Name
1240H SBI0CR1 1H SBI0DBR 2H I2C0AR 3H SBI0CR2/SBI0SR 4H SBI0BR0 5H 6H 7H SBI0CR0 8H 9H AH BH CH DH EH FH
Name
Name
Address
1180H TB0RUN
1190H TB1RUN
1200H SC0BUF 1H SC0CR 2H SC0MOD0 3H BR0CR 4H BR0ADD 5H SC0MOD1 6H 7H SIRCR 8H 9H AH BH CH DH EH FH
Note: Do not access no allocated name address.
92CF26A-692
2007-11-21
TMP92CF26A
[18] 10-bit ADC Address Name Address Name
12A0H ADREG0L 1H ADREG0H 2H ADREG1L 3H ADREG1H 4H ADREG2L 5H ADREG2H 6H ADREG3L 7H ADREG3H 8H ADREG4L 9H ADREG4H AH ADREG5L BH ADREG5H CH Reserved DH Reserved EH Reserved FH Reserved 12B0H ADREGSPL 1H ADREGSPH 2H Reserved 3H Reserved 4H ADCM0REGL 5H ADCM0REGH 6H ADCM1REGL 7H ADCM1REGH 8H ADMOD0 9H ADMOD1 AH ADMOD2 BH ADMOD3 CH ADMOD4 DH ADMOD5 EH FH ADCCLK
[19] WDT Address Name
1300H WDMOD 1H WDCR 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH
[20] RTC Address Name
1320H SECR 1H MINR 2H HOURR 3H DAYR 4H DATER 5H MONTHR 6H YEARR 7H PAGER 8H RESTR 9H AH BH CH DH EH FH
[21] MLD Address Name
1330H ALM 1H MELALMC 2H MELFL 3H MELFH 4H ALMINT 5H 6H 7H 8H 9H AH BH CH DH EH FH
Note: Do not access no allocated name address.
92CF26A-693
2007-11-21
TMP92CF26A
[22] I2S Address
1H 2H 3H 4H 5H 6H 7H 8H I2S0CTL 9H I2S0CTL AH I2S0C BH I2S0C CH DH EH FH
[23] MAC Name Address
1H 2H 3H 4H 5H 6H 7H 8H I2S1CTL 9H I2S1CTL AH I2S1C BH I2S1C CH DH EH FH
Name
Address
Name
Address
1BF0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH
Name
1800H I2S0BUF
1810H I2S1BUF
1BE0H MACMA 1H MACMA 2H MACMA 3H MACMA 4H MACMB 5H MACMB 6H MACMB 7H MACMB 8H MACORL 9H MACORL AH MACORL BH MACORL CH MACORH DH MACORH EH MACORH FH MACORH
CH MACCR DH EH FH
Note: Do not access no allocated name address.
92CF26A-694
2007-11-21
TMP92CF26A
(1) I/O ports (1/11) Symbol
P1
Name
PORT1
Address
0004H
7
P17
6
P16
5
P15
4
P14
3
P13
2
P12
1
P11
0
P10
P4
PORT4
P5
PORT5
P6
PORT6
P7
PORT7
P8
PORT8
P9
PORT9
PA
PORTA
PC
PORTC
PF
PORTF
PG
PORTG
PJ
PORTJ
R/W Data from external port (Output latch register is cleared to "0") - P47 P46 P45 P44 P43 P42 P41 P40 R/W 0010H 0 0 0 0 0 0 0 0 - - - - - - - - P57 P56 P55 P54 P53 P52 P51 P50 R/W 0014H 0 0 0 0 0 0 0 0 - - - - - - - - P67 P66 P65 P64 P63 P62 P61 P60 R/W 0018H Data from external port (Output latch register is cleared to "0") - P76 P75 P74 P73 P72 P71 P70 R/W Data from external port Data from external port Data from external port 001CH (Output latch register is (Output latch register is (Output latch register is 1 set to "1") cleared to "0") set to "1") - - - - P87 P86 P85 P84 P83 P82 P81 P80 R/W 0020H 1 1 1 1 1 0 (Note) 1 1 - - - - - - - - P97 P96 P92 P91 P90 R R/W 0024H Data from external port Data from external port (Output latch register is set to "1") - - PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 R 0028H Data from external port - PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 R/W 0030H Data from external port (Output latch register is set to "1") - PF7 PF5 PF4 PF3 PF2 PF1 PF0 R/W R/W 003CH 1 Data from external port (Output latch register is set to "1") - - PG5 PG4 PG3 PG2 PG1 PG0 R 0040H Data from external port - PJ7 PJ6 PJ5 PJ4 PJ3 PJ2 PJ1 PJ0 R/W Data from external port 004CH 1 1 1 1 1 1 (Output latch register is set to "1") - - - - - - -
Note: If it is started at boot mode (AM [1:0] = "11"), output latch of P82 is set to "1".
92CF26A-695
2007-11-21
TMP92CF26A
(1) I/O ports (2/11) Symbol
PK
Name
PORTK
Address
7
PK7
6
PK6 0 - PL6 0 -
5
PK5 0 - PL5 0 -
4
PK4 R/W 0 - PL4 R/W 0 -
3
PK3 0 - PL3 0 -
2
PK2 0 - PL2 0 - PM2 R/W 1 - PN2
1
PK1 0 - PL1 0 - PM1 1 - PN1
0
PK0 0 - PL0 0 -
0050H
0 - PL7 0 - PM7 R/W 1 - PN7
PL
PORTL
0054H
PM
PORTM
0058H
PN
PORTN
005CH
PP
PORTP
0060H
PR
PORTR
0064H
PT
PORTT
00A0H
PU
PORTU
00A4H
PV
PORTV
00A8H
PW
PORTW
00ACH
PX
PORTX
00B0H
PN3 PN0 R/W Data from external port (Output latch register is cleared to "1") - PP7 PP6 PP5 PP4 PP3 PP2 PP1 R/W Data from external port 0 0 (Output latch register is cleared to "0") - - - PR3 PR2 PR1 PR0 R/W Data from external port (Output latch register is cleared to "0") - PT7 PT6 PT5 PT4 PT3 PT2 PT1 PT0 R/W Data from external port (Output latch register is cleared to "0") - PU7 PU6 PU5 PU4 PU3 PU2 PU1 PU0 R/W Data from external port (Output latch register is cleared to "0") - PV7 PV6 PV4 PV3 PV2 PV1 PV0 R/W R/W Data from external port Data from external port (Output latch register is (Output latch register is cleared to "0") cleared to "0") - - PW7 PW6 PW5 PW4 PW3 PW2 PW1 PW0 R/W Data from external port (Output latch register is cleared to "0") - PX7 PX5 PX4 R/W R/W Data from external port Data from external port (Output latch register is (Output latch cleared to "0")
register is cleared to "0")
PN6
PN5
PN4
- PZ7 PZ PORTZ 0068H
- PZ6 PZ3 PZ2 PZ1 R/W Data from external port (Output latch register is cleared to "0") - PZ5 PZ4 PZ0
92CF26A-696
2007-11-21
TMP92CF26A
(1) I/O ports (3/11) Symbol Name
PORT1 control register
Address
0006H (Prohibit RMW)
7
P17C
6
P16C 0 -
5
P15C 0 -
4
P14C W 0 - 0: Input
3
P13C 0 - 1:Output
2
P12C 0 -
1
P11C 0 -
0
P10C 0 - P1F W 0/1 - 0: Port 1:Data bus (D8~D15) P40F 0/1 - P50F 0/1 - P60C 0 - P60F 0/1 -
P1CR
0 -
P1FC
PORT1 function register
0007H (Prohibit RMW)
P47F P4FC PORT4 function register 0013H (Prohibit RMW) 0/1 - P57F P5FC PORT5 function register 0017H (Prohibit RMW) 0/1 - P67C P6CR PORT6 control register 001AH (Prohibit RMW) 0 - P67F P6FC PORT6 function register 001BH (Prohibit RMW) 0/1 -
P46F 0/1 - P56F 0/1 - P66C 0 - P66F 0/1 - P76C 0 -
P45F 0/1 - 0: Port P55F 0/1 - 0: Port P65C 0 - P65F 0/1 - 0: Port P75C 0 -
NDR/ B port, R/ W
P44F W
P43F
P42F
P41F 0/1 - P51F 0/1 - P61C 0 - P61F 0/1 - P71C 0 -
1: Output port,
NDRE @
0/1 0/1 0/1 - - - 1: Address bus (A0~A7) P54F P53F P52F W 0/1 0/1 0/1 - - - 1: Address bus (A8~A15) P64C P63C P62C W 0 0 0 - - - 0: Input P64F W 0/1 0/1 0/1 - - - 1: Address bus (A16~A23) P74C P73C P72C W 0 0 0 - - -
1: Output port, EA25 1: Output port, EA24 1: Output port,
NDWE @
1: Output P63F P62F
PORT7 P7CR control register
001EH (Prohibit RMW)
0: Input port, 0: Input port, 0: Input port 0: Input port 0: Input port 0: Input port
WAIT
1:Output port 1: Output
= 0,
WRLU @
= 0,
WRLL @
= 1
= 1
P76F 0 -
0: Port 1: WAIT
P75F 0 -
0: Port 1:NDR/ B , R/ W
P74F 0 -
0:Port 1: EA25
P7FC
PORT7 function register
001FH (Prohibit RMW)
P73F W 0 -
0:Port 1: EA24
P72F 0 -
0: Port 1: NDWE @ = 0,
WRLU @
P71F 0 -
0: Port 1:
NDRE @
P70F 0 -
0: Port 1: RD
= 0,
WRLL @
= 1
= 1
92CF26A-697
2007-11-21
TMP92CF26A
(1) I/O ports (4/11) Symbol Name
Address
7
P87F 0 -
6
P86F 0 -
5
P85F 0 -
4
P84F W 0 - 0: Port 1: CSZB
3
P83F 0 - 0: Port 1: CS3 ,
CSXA
2
P82F 0 - 0: Port,
CSZA
1
P81F 0 - 0: Port 1: CS1
0
P80F 0 - 0: Port 1: CS0
P8FC
PORT8 function register
0023H (Prohibit 0: Port 0: Port 0: Port RMW) 1: 1: 1: CSZC
1: CS2 ,
SDCS
P87F2 W PORT8 function fegister2 0 - 0021H (Prohibit 0: CSXB RMW) 1: ND1CE
P86F2 0 -
0: CSZD 1: ND0CE
P83F2 0 -
0: Output Port, CS3 1: CSXA
P82F2 W 0 -
0: Output 1: CSZA ,
SDCS
P81F2 0 -
0:
P8FC2
port, CS2 1: SDCS
P92C 0 - P9CR PORT9 control register 0026H (Prohibit RMW) 0 Input port,
CTS 0
P91C W 0 - 0: Input port, RXD0 1: Output port,
P90C 0 - 0: Input port, 1: Output port, TXD0 P90F W 0 - 0:Port 1:TXD0 P90FC2 W 0 - 0:CMOS 1:Open -Drain
1: Output port, P96F W 0 - 0: Input port, 1: INT4 - W 0 - Always write "0" SCLK0 P92F W 0 - 0:Port,
CTS 0
P9FC
PORT9 function register
0027H (Prohibit RMW)
P9FC2
PORT9 function register2
0025H (Prohibit RMW)
1:SCLK0 - W 0 - Always write "0"
92CF26A-698
2007-11-21
TMP92CF26A
(1) I/O ports (5/11) Symbol Name
PORTA function register
Address
002BH (Prohibit RMW)
7
PA7F
6
PA6F 0 - PC6C 0 - 0: Input port, EA28 1: Output port
5
PA5F
4
PA4F W
3
PA3F
2
PA2F
1
PA1F 0 - PC1C 0 - port, INT1 1: Output port, TA0IN
0
PA0F 0 - PC0C 0 - 0: Input port, INT0 1: Output port
PAFC
0 - PC7C 0 -
0 0 - - 0: Key-in disable PC5C PC4C W 0 - 0: Input port, EA27 1: Output port 0 - 0: Input port, EA26 1: Output port
0 0 - - 1: Key-in enable PC3C PC2C 0 - 0: Input port, INT3 1: Output port, TA2IN 0 - INT2 1: Output port,
PCCR
PORTC control register
0: Input 0032H (Prohibit RMW) port, 1: Output port, KO output (Open -drain) PC7F 0 - 0: Port 1:KO output (Open -Drain)
0: Input port, 0: Input
PC6F 0 - 0: Port 1:EA28
PC5F 0 - 0:Port 1:EA27
PC4F W 0 - 0:Port 1:EA26
PC3F 0 - 0:Port 1:INT3 ,TA2IN
PC2F 0 - 0: Port 1: INT2
PC1F 0 - 0: Port 1: INT1, TA0IN
PC0F 0 - 0: Port 1:INT0
PCFC
PORTC function register
0033H (Prohibit RMW)
PF5C PFCR PORTF control register 003EH (Prohibit RMW) PF7F W 1 - 0:Output port 1: SDCLK 0 - PF5F 0 - 0:Port
PF4C 0 - PF4F 0 - 0:Port
PF3C W
PF2C
PF1C 0 - PF1F 0 - 0:Port 1:I2S0DO
PF0C 0 - PF0F 0 - 0:Port 1:I2S1CKO
PFFC
PORTF function register
003FH (Prohibit RMW)
0 0 - - 0: Input, 1: Output PF3F PF2F W 0 0 - - 0:Port 0:Port
1:I2S1WS 1:I2S1DO 1:I2S1CKO 1:I2S0WS
92CF26A-699
2007-11-21
TMP92CF26A
(1) I/O ports (6/11) Symbol Name Address 7 6 5 4 3
PG3F W 0 - 0:Input port,AN3 1: ADTRG PJ6C PJCR PORTJ control register 004EH (Prohibit RMW) PF7F PORTJ function register 0 004FH - (Prohibit RMW) 0: Port
1: SDCKE
2
1
0
PGFC
PORTG function register
0043H (Prohibit RMW)
PJ5C W 0 - 1: Output PF5F 0 -
0: Port 1: NDALE
0 - 0:Input PF6F 0 -
0: Port 1:NDCLE
PF4F W 0 -
0: Port
PF3F 0 -
0: Port
PF2F 0 -
0: Port
SRWR
PF1F 0 -
0: Port 1: SDCAS ,
SRLUB
PF0F 0 -
0: Port 1: SDRAS ,
SRLLB
PJFC
1:SDLUDQM 1:SDLLDQM 1: SDWE ,
PK7F PORTK function register 0053H (Prohibit RMW) 0 - 0: Port
PK6F 0 - 0: Port
PK5F 0 - 0: Port
PK4F W 0 - 0: Port
PK3F 0 - 0: Port
PK2F 0 - 0: Port
PK1F 0 - 0: Port
PK0F 0 - 0: Port
PKFC
PLFC
PORTL function register
PMFC
PORTM function register
1: LGOE2 1: LGOE1 1: LGOE0 1: LHSYNC 1: LVSYNC 1: LFR 1: LLOAD 1: LCP0 PL7F PL6F PL5F PL4F PL3F PL2F PL1F PL0F W 0057H (Prohibit 0 0 0 0 0 0 0 0 RMW) - - - - - - - - 0: Port 1: Data bus for LCDC (LD7~LD0) PM7F PM2F PM1F W W 0 0 0 005BH - - - (Prohibit RMW) 0: Port 0: Port 0: Port 1: PWE 1: ALARM ,
MLDALM
1:MLDALM ,TA1OUT
92CF26A-700
2007-11-21
TMP92CF26A
(1) I/O ports (7/11) Symbol Name
PORTN control register
Address
005EH (Prohibit RMW)
7
PN7C
6
PN6C 0 - PN6F 0 -
5
PN5C 0 - PN5F 0 -
4
PN4C W 0 -
3
PN3C 0 -
2
PN2C 0 - PN2F 0 -
1
PN1C 0 - PN1F 0 - PP1C 0 - PP1F
0
PN0C 0 - PN0F 0 -
PNCR
0 - PN7F
PNFC
PORTN function register
005FH (Prohibit RMW)
0 -
0: Input 1: Output PN4F PN3F W 0 0 - -
PPCR
PORTP control register
0062H (Prohibit RMW) PP7F PP6F
0:CMOS output 1:Open-Drain output PP5C PP4C PP3C PP2C W 0 0 0 0 - - - - PP5F PP4F W 0 - 0: Input 1: Output PP3F PP2F
PPFC
PORTP function register
0 0 0 0 0 0 0063H - - - - - - (Prohibit 0: Port 0: Port 0: Port 0: Port 0: Port 0: Port 0: Port RMW) 1: TB1OUT0 1: TB0OUT0 1: TB1IN0@ 1:TB0IN0@ 1:TA7OUT@ 1: TA5OUT 1: TA3OUT
=1 INT7@ =0 =1I =1 INT5@ NT6@ =0 =0
PR3C PRCR PORTR control register 0066H (Prohibit RMW) 0 - PR3F PORTR function register 0067H (Prohibit RMW) 0 - 0: Port PT7C PTCR PORTT control register 00A2H (Prohibit RMW) 0 - PT7F PTFC PORTT function register 00A3H (Prohibit RMW) 0 - PT6C 0 - PT6F 0 - PT5C 0 - PT5F 0 - PT4C W 0 - 0: Input PT4F W 0 - 0 - 0 - 1: Output PT3F PT3C
PR2C W
PR1C
PR0C 0 - PR0F 0 - 0: Port 1: SPDI PT0C 0 - PT0F 0 -
PRFC
0 0 - - 0: Input, 1: Output PR2F PR1F W 0 0 - - 0: Port PT2C 0 - PT2F 0 - 0: Port 1: SPDO PT1C 0 - PT1F 0 -
1: SPCLK 1: SPCS
0: Port 1: Data bus for LCDC (LD15~LD8)
92CF26A-701
2007-11-21
TMP92CF26A
(1) I/O ports (8/11) Symbol Name
PORTU control register Address 00A6H (Prohibit RMW)
7
PU7C
6
PU6C 0 - PU6F 0 - 0: Port 1: LD22 PV6C W 0 -
5
PU5C 0 - PU5F 0 - 0: Port
=1
4
PU4C W 0 - 0: Input PU4F W 0 - 0: Port
3
PU3C 0 - 1: Output PU3F 0 - 0: Port 1: LD19
2
PU2C 0 - PU2F 0 - 0: Port 1: LD18 PV2C 0 - PV2F 0 -
1
PU1C 0 - PU1F 0 - 0: Port 1: LD17 PV1C W 0 -
0
PU0C 0 - PU0F 0 - 0: Port 1: LD16 PV0C 0 -
PUCR
0 - PU7F
PUFC
PORTU function register
0 00A7H - (Prohibit RMW) 0: Port 1: LD23 PV7C
1: LD21@ 1: LD20
PORTV PVCR control register
00AAH (Prohibit RMW) 0 -
PVFC
PORTV function register
00ABH (Prohibit RMW) 0: Port
0: Input 1: Output PV7F PV6F W 0 0 - -
0: Port 1: SDA
0: Input 1: Output PV1F PV0F W 0 0 - -
0: Port 0: Port 1: Reserved 1: SCLK0@ =1
1: SCL
0: Port 1:Reserved
PW7C PORTW PWCR control register 00AEH (Prohibit RMW) 0 - PW7F PWFC PORTW function register 00AFH (Prohibit RMW) 0 -
PW6C 0 - PW6F 0 -
PW5C 0 - PW5F 0 -
PW4C W 0 - 0: Input PW4F W 0 -
PW3C 0 - 1: Output PW3F 0 -
PW2C 0 - PW2F 0 -
PW1C 0 - PW1F 0 -
PW0C 0 - PW0F 0 -
0: Port 1: Reserved PORTX PXCR control register 00B2H (Prohibit RMW) PX7C W 0 - 0: Input PX7F W 0 - PX5C W 0 - 1: Output PX5F W 0 -
0:Port 1: X1USB input
PXFC
PORTX function register
00B3H (Prohibit 0:Port RMW) 1:Reserved
PX4F W 0 -
0: Port 1:CLKOUT at =0 LDIV at =1
PZ7C PORTZ PZCR control register 006AH (Prohibit RMW) 0 -
PZ6C 0 -
PZ5C 0 -
PZ4C W 0 - 0: Input
PZ3C 0 - 1: Output
PZ2C 0 -
PZ1C 0 -
PZ0C 0 -
92CF26A-702
2007-11-21
TMP92CF26A
(1) I/O ports (9/11) Symbol Name
PORT1 drive register
Address
7
P17D
6
P16D
5
P15D
4
3
2
1
0
P1DR
0081H
P2DR
PORT2 drive register
0082H
P3DR
PORT3 drive register
0083H
P4DR
PORT4 drive register
0084H
P5DR
PORT5 drive register
0085H
P6DR
PORT6 drive register
0086H
P7DR
PORT7 drive register
0087H
P8DR
PORT8 drive register
0088H
P9DR
PORT9 drive register
0089H
PADR
PORTA drive register
008AH
PCDR
PORTC drive register
008CH
PFDR
PORTF drive register
008FH
P14D P13D P12D P11D P10D R/W 1 1 1 1 1 1 1 1 - - - - - - - - Input/Output buffer drive register for standby mode P27D P26D P25D P24D P23D P22D P21D P20D R/W 1 1 1 1 1 1 1 1 - - - - - - - - Input/Output buffer drive register for standby mode P37D P36D P35D P34D P33D P32D P31D P30D R/W 1 1 1 1 1 1 1 1 - - - - - - - - Input/Output buffer drive register for standby mode P47D P46D P45D P44D P43D P42D P41D P40D R/W 1 1 1 1 1 1 1 1 - - - - - - - - Input/Output buffer drive register for standby mode P57D P56D P55D P54D P53D P52D P51D P50D R/W 1 1 1 1 1 1 1 1 - - - - - - - - Input/Output buffer drive register for standby mode P67D P66D P65D P64D P63D P62D P61D P60D R/W 1 1 1 1 1 1 1 1 - - - - - - - - Input/Output buffer drive register for standby mode P76D P75D P74D P73D P72D P71D P70D R/W 1 1 1 1 1 1 1 - - - - - - - Input/Output buffer drive register for standby mode P87D P86D P85D P84D P83D P82D P81D P80D R/W 1 1 1 1 1 1 1 1 - - - - - - - - Input/Output buffer drive register for standby mode P97D P96D P92D P91D P90D R/W R/W 1 1 1 1 1 - - - - - Input/Output buffer Input/Output buffer drive register drive register for for standby mode standby mode PA7D PA6D PA5D PA4D PA3D PA2D PA1D PA0D R/W 1 1 1 1 1 1 1 1 - - - - - - - - Input/Output buffer drive register for standby mode PC7D PC6D PC5D PC4D PC3D PC2D PC1D PC0D R/W 1 1 1 1 1 1 1 1 - - - - - - - - Input/Output buffer drive register for standby mode PF7D PF5D PF4D PF3D PF2D PF1D PF0D R/W R/W 1 1 1 1 1 1 1 - - - - - - - Input/Output buffer drive register for standby mode
92CF26A-703
2007-11-21
TMP92CF26A
(1) I/O ports (10/11) Symbol Name Address 7 6 5 4 3
PG3D R/W PGDR PORTG drive register 0090H 1 1 - - Input/Output buffer drive register for standby mode PJ3D PJ2D
2
PG2D
1
0
PJ7D PJDR PORTJ drive register 0093H 1 - PK7D PORTK PKDR drive register 0094H 1 - PL7D PLDR PORTL drive register 0095H 1 - PM7D R/W 1 - PN7D PNDR PORTN drive register 0097H 1 - PP7D PPDR PORTP drive register 0098H 1 -
PJ6D 1 - PK6D 1 -
PJ4D R/W 1 1 1 1 - - - - Input/Output buffer drive register for standby mode PK5D PK4D R/W PK3D PK2D
PJ5D
PJ1D 1 - PK1D
PJ0D 1 - PK0D
PMDR
PORTM drive register
0096H
PRDR
PORTR drive register
0099H
PT7D PTDR PORTT drive register 009BH 1 - PU7D PUDR PORTU drive register 009CH 1 - PV7D PVDR PORTV drive register 009DH 1 -
1 1 1 1 1 1 - - - - - - Input/Output buffer drive register for standby mode PL6D PL5D PL4D PL3D PL2D PL1D PL0D R/W 1 1 1 1 1 1 1 - - - - - - - Input/Output buffer drive register for standby mode PM2D PM1D R/W 1 1 - - Input/Output buffer drive register for standby mode PN6D PN5D PN4D PN3D PN2D PN1D PN0D R/W 1 1 1 1 1 1 1 - - - - - - - Input/Output buffer drive register for standby mode PP6D PP5D PP4D PP3D PP2D PP1D R/W 1 1 1 1 1 1 - - - - - - Input/Output buffer drive register for standby mode PR3D PR2D PR1D PR0D R/W 1 1 1 1 - - - - Input/Output buffer drive register for standby mode PT6D PT5D PT4D PT3D PT2D PT1D PT0D R/W 1 1 1 1 1 1 1 - - - - - - - Input/Output buffer drive register for standby mode PU6D PU5D PU4D PU3D PU2D PU1D PU0D R/W 1 1 1 1 1 1 1 - - - - - - - Input/Output buffer drive register for standby mode PV6D PV4D PV3D PV2D PV1D PV0D R/W R/W 1 1 1 1 1 1 - - - - - - Input/Output buffer drive register for standby mode
92CF26A-704
2007-11-21
TMP92CF26A
(1) I/O ports (11/11) Symbol Name
PORTW drive register
Address
7
PW7D
6
PW6D 1 -
5
PW5D 1 - PX5D 1 -
4
PW4D R/W 1 - PX4D 1 -
3
PW3D 1 -
2
PW2D 1 -
1
PW1D 1 -
0
PW0D 1 -
PWDR
009EH
1 - PX7D R/W
Input/Output buffer drive register for standby mode
PORTX PXDR drive register 009FH
1 -
Input/Output buffer drive register for standby mode PZ7D PZDR PORTZ drive register 009AH 1 - PZ6D 1 - PZ5D 1 - PZ4D R/W 1 - 1 - 1 - 1 - 1 - PZ3D PZ2D PZ1D PZ0D
Input/Output buffer drive register for standby mode
92CF26A-705
2007-11-21
TMP92CF26A
(2) Interrupt control (1/4) Symbol Name
Address
7
- -
6
- -
5
- -
4
-
3
I0C R 0
2
INT0 I0M2 0 INT1 I1M2 0 INT3 I3M2 0 INT5 I5M2 0 INT7 I7M2
1
I0M1 R/W 0 I1M1 R/W 0 I3M1 R/W 0 I5M1 R/W 0
0
I0M0 0 I1M0 0 I3M0 0 I5M0 0 I7M0 0 ITA0M0 0 ITA2M0 0 ITA4M0 0 ITA6M0 0 ITB00M0 0 ITB10M0 0 IRX0M0 0 ISBIM0 0 ISPIRM0 0
INTE0
INT0 enable
00F0H
Always write "0" INT2 INTE12 INT1 & INT2 enable 00D0H I2C R 0 I4C R 0 I6C R 0 - - I2M2 0 INT4 INTE34 INT3 & INT4 enable 00D1H I4M2 0 INT6 INTE56 INT5 & INT6 enable 00D2H I6M2 0 - INTE7 INT7 enable 00D3H - - Always write "0" INTTA1 (TMRA1) ITA1M2 ITA1M1 R/W 0 0 INTTA3 (TMRA3) ITA3M2 ITA3M1 R/W 0 0 INTTA5 (TMRA5) ITA5M2 ITA5M1 R/W 0 0 INTTA7 (TMRA7) ITA7M2 ITA7M1 R/W 0 0 INTTB01 (TMRB0) ITB01M2 ITB01M1 R/W 0 0 INTTB11 (TMRB1) INTTB10 & INTETB1 INTTB11 enable 00D9H ITB11C R 0 INTRX0 & INTTX0 enable ITX0C R 0 INTESBI ADM INTSBI & INTADM enable IADM0C R 0 INTSPI enable ISPITC R 0 0 INTSPITX INTESPI 00E1H ISPITM2 0 ISPITM1 R/W 0 ISPITM0 0 ITB11M2 0 ITB11M1 R/W 0 ITB11M0 0 ITX0M0 0 IADMM0 0 - - I6M1 R/W 0 I6M0 0 I4M1 R/W 0 I4M0 0 I2M1 R/W 0 I2M0 0
I1C R 0 I3C R 0 I5C R 0 I7C R 0 ITA0C R 0 ITA2C R 0 ITA4C R 0 ITA6C R 0 ITB00C R 0 ITB10C R 0 IRX0C R 0 ISBI0C R 0 ISPIRC R 0
INTTA0 & INTETA01 INTTA1 enable INTTA2 & INTETA23 INTTA3 enable INTTA4 & INTETA45 INTTA5 enable INTTA6 & INTETA67 INTTA7 enable INTTB00 & INTETB0 INTTB01 enable
00D4H
ITA1C R 0 ITA3C R 0 ITA5C R 0 ITA7C R 0 ITB01C R 0
ITA1M0 0 ITA3M0 0 ITA5M0 0 ITA7M0 0 ITB01M0 0
00D5H
00D6H
00D7H
00D8H
I7M1 R/W 0 0 INTTA0 (TMRA0) ITA0M2 ITA0M1 R/W 0 0 INTTA2 (TMRA2) ITA2M2 ITA2M1 R/W 0 0 INTTA4 (TMRA4) ITA4M2 ITA4M1 R/W 0 0 INTTA6 (TMRA6) ITA6M2 ITA6M1 R/W 0 0 INTTB00 (TMRB0) ITB00M2 ITB00M1 R/W 0 0 INTTB10 (TMRB1) ITB10M2 0 ITB10M1 R/W 0
INTES0
00DBH
INTTX0 ITX0M2 ITX0M1 R/W 0 INTADM IADMM2 0 IADMM1 R/W 0
INTRX0 IRX0M2 IRX0M1 R/W 0 INTSBI ISBIM2 0 INTSPIRX ISPIRM2 0 ISPIRM1 R/W 0 ISBIM1 R/W 0 0
00E0H
92CF26A-706
2007-11-21
TMP92CF26A
(2) Interrupt control (2/4) Symbol
INTEUSB
Name
INTUSB enable
Address
7
- -
6
- -
5
4
-
3
IUSBC R 0 IALMC R 0
2
INTUSB IUSBM2 0 IALMM2
1
IUSBM1 R/W 0 IALMM1
0
IUSBM0 0 IALMM0 0 IRM0 0 IKM0 0 ILCDM0 0 II2S0M0 0 IRDYM0 0 IP0M0 0 IADM0 0
00E3H
- - Always write "0" - - -
INTALM - R/W 0 0 INTRTC IRM2 IRM1 R/W 0 0 INTKEY IKM2 IKM1 R/W 0 0 INTLCD ILCDM2 ILCDM1 R/W 0 0 INTI2S0 II2S0M2 II2S0M1 R/W 0 0 INTRDY IRDYM2 IRDYM1 R/W 0 0 INTP0 IP0M2 IP0M1 R/W 0 0 INTAD IADM2 IADM1 R/W 0 0
INTEALM
INTALM enable
00E5H
- -
INTERTC
INTRTC enable
00E8H
- -
INTEKEY
INTKEY enable
00E9H
- -
INTELCD
INTLCD enable INTI2S0 &
00EAH
- -
INTEI2S01 INTI2S1 enable INTRSC & INTENDFC INTRDY enable
00EBH
II2S1C R 0 IRSCC R 0 - -
00ECH
INTEP0
INTP0 enable INTAD &
00EEH
INTEAD
INTADHP enable
00EFH
IADHPC R 0
- Always write "0" - - - - Always write "0" - - - - Always write "0" - - - - Always write "0" INTI2S1 II2S1M2 II2S1M1 R/W 0 0 INTRSC IRSCM2 IRSCM1 R/W 0 0 - - - - Always write "0" INTADHP IADHPM2 IADHPM1 R/W 0 0
-
IRC R 0 IKC R 0 ILCD1C R 0 II2S0C R 0 IRDYC R 0 IP0C R 0 IADC R 0
-
-
II2S1M0 0 IRSCM0 0 -
IADHPM0
0
92CF26A-707
2007-11-21
TMP92CF26A
(2) Interrupt control (3/4) Symbol Name
Address
7
6
5
4
3
2
1
0
INTTC0/INTDMA0 INTETC01 & /INTEDMA01 INTTC1/INTDMA1 enable INTTC2/INTDMA2 INTETC23 & /INTEDMA23 INTTC3/INTDMA3 enable INTTC4/INTDMA4 INTETC45 & /INTEDMA45 INTTC5/INTDMA5 enable
00F1H
INTTC1/INTDMA1 INTTC0/INTDMA0 ITC1C ITC1M2 ITC1M1 ITC1M0 ITC0C ITC0M2 ITC0M1 ITC0M0 /IDMA1C /IDMA1M2 /IDMA1M1 /IDMA1M0 /IDMA0C /IDMA0M2 /IDMA0M1 /IDMA0M0 R R R/W R/W 0 0 0 0 0 0 0 0 INTTC3/INTDMA3 INTTC2/INTDMA2 ITC3C ITC3M2 ITC3M1 ITC3M0 ITC2C ITC2M2 ITC2M1 ITC2M0 /IDMA3C /IDMA3M2 /IDMA3M1 /IDMA3M0 /IDMA2C /IDMA2M2 /IDMA2M1 /IDMA2M0 R R R/W R/W 0 0 0 0 0 0 0 0 INTTC5/INTDMA5 INTTC4/INTDMA4 ITC5C ITC5M2 ITC5M1 ITC5M0 ITC4C ITC4M2 ITC4M1 ITC4M0 /IDMA5C /IDMA5M2 /IDMA5M1 /IDMA5M0 /IDMA4C /IDMA4M2 /IDMA4M1 /IDMA4M0 R R R/W R/W 0 ITC7C R 0 0 ITC7M2 0 - W 0 Always write "0" 0 ITC7M1 R/W 0 0 ITC7M0 0 0 ITC6C R 0 0 ITC6M2 0 0 ITC6M1 R/W 0 0 ITC6M0 0 IR0LE W 1 0: INTRX0 edge mode 1: INTRX0 level mode - R/W 0 INTTC7 (DMA7) INTTC6 (DMA6)
00F2H
00F3H
INTETC67
INTTC6 & INTTC7 enable
00F4H
SIO SIMC interrupt mode control
- W 0 00F5H Always (Prohibit write "0" RMW)
Interrupt IIMC0 input mode control 0
00F6H (Prohibit INT5 RMW) edge
I5EDGE W 0
I4EDGE W 0
INT4 edge 0: Rising 1: Falling
I3EDGE W 0
INT3 edge 0: Rising 1: Falling
I2EDGE W 0
INT2 edge 0: Rising 1: Falling
I1EDGE W 0
INT1 edge 0: Rising 1: Falling
I0EDGE W 0
INT0 edge 0: Rising 1: Falling
I0LE R/W 0
0: Rising 1: Falling
0: INT0 Always edge mode write "0" 1:INT0 level mode
- INTWDT INTWD enable 00F7H - - - - - Always write "0" Interrupt clear control 00F8H (Prohibit RMW) CLRV7 0 CLRV6 0 CLRV5 0 CLRV4 W 0 0 0 - ITCWD R 0 CLRV3 - - -
INTWD - - - CLRV1 0 I7EDGE W - - - CLRV0 0 I6EDGE W 0
INT6 edge 0: Rising 1: Falling
CLRV2
INTCLR
Interrupt vector
Interrupt IIMC1 input mode control 1
00FAH (Prohibit RMW)
0
INT7 edge 0: Rising 1: Falling
92CF26A-708
2007-11-21
TMP92CF26A
(2) Interrupt control (4/4) Symbol
DMA0V
Name
DMA0 start vector DMA1 start vector
Address
0100H
7
6
5
DMA0V5 0 DMA1V5
4
DMA0V4 0 DMA1V4 0 DMA2V4 0 DMA3V4
3
2
1
DMA0V1 0 DMA1V1 0 DMA2V1 0 DMA3V1 0 DMA4V1 0 DMA5V1 0 DMA6V1 0 DMA7V1 0 DBST1 0 DREQ2 0
DMASEL1
0
DMA0V0 0 DMA1V0 0 DMA2V0 0 DMA3V0 0 DMA4V0 0 DMA5V0 0 DMA6V0 0 DMA7V0 0 DBST0 0 DREQ1 0
DMASEL0
DMA0V3 DMA0V2 R/W 0 0 DMA0 start vector DMA1V3 DMA1V2 R/W 0 0 DMA1 start vector DMA2V3 DMA2V2 R/W
DMA1V
0101H
0 DMA2V5
DMA2V
DMA2 start vector DMA3 start vector DMA4 start vector DMA5 start vector DMA6 start vector DMA7 start vector
0102H
0 DMA3V5
0 0 DMA2 start vector
DMA3V
0103H
DMA4V
0104H
DMA5V
0105H
DMA6V
0106H
DMA7V
0107H
DBST7 DMAB DMA burst 0108H 0 DREQ7 DMAR DMA request 0109H (Prohibit RMW) 0
DBST6 0 DREQ6 0
DMA3V3 DMA3V2 R/W 0 0 0 0 DMA3 start vector DMA4V5 DMA4V4 DMA4V3 DMA4V2 R/W 0 0 0 0 DMA4 start vector DMA5V5 DMA5V4 DMA5V3 DMA5V2 R/W 0 0 0 0 DMA5 start vector DMA6V5 DMA6V4 DMA6V3 DMA6V2 R/W 0 0 0 0 DMA6 start vector DMA7V5 DMA7V4 DMA7V3 DMA7V2 R/W 0 0 0 0 DMA7 start vector DBST5 DBST4 DBST3 DBST2 R/W 0 0 0 0 1: DMA request on burst mode DREQ5 0
DMASEL5
DREQ5
DREQ4 R/W
DREQ3 0
0 0 1: DMA request in software
DMASEL4 DMASEL3
DMASEL2
Micro DMASEL DMA/HDMA Select
R/W 010AH 0 0:Micro DMA5 1:HDMA5 0 0: Micro DMA4 0 0: Micro DMA3 0 0: Micro DMA2 0 0: Micro DMA1 1:HDMA1 0 0: Micro DMA0 1:HDMA0
1:HDMA4 1:HDMA3 1:HDMA2
92CF26A-709
2007-11-21
TMP92CF26A
(3) Memory controller (1/4) Symbol Name
Address
7
B0WW3 0
Write waits
6
B0WW2 0
5
B0WW1 1
4
3
2
B0WR2 0
1
B0WR1 1
0
B0WR0 0
B0WW0 B0WR3 R/W 0 0
Read waits
B0CSL
BLOCK0 CS/WAIT control register low
0140H (Prohibit RMW)
0010: 1 wait 0001: 0 waits 0110: 3 waits 0101: 2 waits 1000: 5 waits 0111: 4 waits 1010: 7 waits 1001: 6 waits 1100: 9 waits 1011: 8 waits 1110: 12 waits 1101: 10 waits 0100: 20 waits 1111: 16 waits 0011: 6 states + WAIT pin input mode Others: Reserved
0010: 1 wait 0001: 0 waits 0110: 3 waits 0101: 2 waits 1000: 5 waits 0111: 4 waits 1010: 7 waits 1001: 6 waits 1100: 9 waits 1011: 8 waits 1110: 12 waits 1101: 10 waits 0100: 20 waits 1111: 16 waits 0011: 6 states + WAIT pin input mode Others: Reserved
B0CSH
BLOCK0 CS/WAIT control register high
0141H (Prohibit RMW)
B0E R/W 0 CS select 0: Disable 1: Enable
B0OM0 R/W 0 0 0 Dummy 00: ROM/SRAM cycle 01: Reserved 0:No insert 10: Reserved 1: Insert 11: Reserved B1WW2 0 B1WW1 1 B1WW0 B1WR3 R/W 0 0 B1WR2 0
B0REC
B0OM1
B0BUS1
B0BUS0
B1WW3 0 BLOCK1 CS/WAIT control register low
0 0 Data bus width 00: 8 bits 01: 16 bits 10: Reserved 11: Don't set B1WR1 B1WR0 1 0
B1CSL
0144H (Prohibit RMW)
Write waits 0010: 1 wait 0001: 0 waits 0110: 3 waits 0101: 2 waits 1000: 5 waits 0111: 4 waits 1010: 7 waits 1001: 6 waits 1100: 9 waits 1011: 8 waits 1110: 12 waits 1101: 10 waits 0100: 20 waits 1111: 16 waits 0011: 6 states + WAIT pin input mode Others: Reserved
Read waits 0010: 1 wait 0001: 0 waits 0110: 3 waits 0101: 2 waits 1000: 5 waits 0111: 4 waits 1010: 7 waits 1001: 6 waits 1100: 9 waits 1011: 8 waits 1110: 12 waits 1101: 10 waits 0100: 20 waits 1111: 16 waits 0011: 6 states + WAIT pin input mode Others: Reserved
B1CSH
BLOCK1 CS/WAIT control register high
0145H (Prohibit RMW)
B1E R/W 0 CS select 0: Disable 1: Enable
B1REC
B2WW3 0
Write waits
B2WW2 0
B2WW1 1
0 Dummy cycle 0:No insert 1: Insert B2WW0 B2WR3 R/W 0 0
B1OM0 R/W 0 0 00: ROM/SRAM 01: Reserved 10: Reserved 11: SDRAM B2WR2 0
B1OM1
B1BUS1
B1BUS0
0 0 Data bus width 00: 8 bits 01: 16 bits 10: Reserved 11: Don't set B2WR1 B2WR0 1 0
Read waits 0010: 1 wait 0001: 0 waits 0110: 3 waits 0101: 2 waits 1000: 5 waits 0111: 4 waits 1010: 7 waits 1001: 6 waits 1100: 9 waits 1011: 8 waits 1110: 12 waits 1101: 10 waits 0100: 20 waits 1111: 16 waits 0011: 6 states + WAIT pin input mode Others: Reserved
B2CSL
BLOCK2 CS/WAIT control register low
0148H (Prohibit RMW)
0010: 1 wait 0001: 0 waits 0110: 3 waits 0101: 2 waits 1000: 5 waits 0111: 4 waits 1010: 7 waits 1001: 6 waits 1100: 9 waits 1011: 8 waits 1110: 12 waits 1101: 10 waits 0100: 20 waits 1111: 16 waits 0011: 6 states + WAIT pin input mode Others: Reserved
B2E BLOCK2 CS/WAIT control register high R/W 0149H (Prohibit RMW)
B2M
B2REC 0 Dummy cycle 0:No insert 1: Insert
B2OM1
B2OM0 R/W
B2BUS1
B2BUS0
B2CSH
1 0 CS select 0: 16 MB 0: Disable 1: Sets 1: Enable area
0 0 00: ROM/SRAM 01: Reserved 10: Reserved 11: SDRAM
0 1 Data bus width 00: 8 bits 01: 16 bits 10: Reserved 11: Don't set
92CF26A-710
2007-11-21
TMP92CF26A
(3) Memory controller (2/4) Symbol Name
Address
7
B3WW3 0
Write waits
6
B3WW2 0
5
B3WW1 1
4
3
2
B3WR2 0
1
B3WR1 1
0
B3WR0 0
B3WW0 B3WR3 R/W 0 0
Read waits 0001: 0 waits 0101: 2 waits 0111: 4 waits 1001: 6 waits 1011: 8 waits 1101: 10 waits 1111: 16 waits
B3CSL
BLOCK3 CS/WAIT control register low
0001: 0 waits
014CH 0101: 2 waits (Prohibit 0111: 4 waits RMW) 1001: 6 waits
1011: 8 waits 1101: 10 waits 1111: 16 waits Others: Reserved
0010: 1 wait 0110: 3 waits 1000: 5 waits 1010: 7 waits 1100: 9 waits 1110: 12 waits 0100: 20 waits
0010: 1 wait 0110: 3 waits 1000: 5 waits 1010: 7 waits 1100: 9 waits 1110: 12 waits 0100: 20 waits
0011: 6 states + WAIT pin input mode
0011: 6 states + WAIT pin input mode Others: Reserved
B3CSH
BLOCK3 CS/WAIT control register high
014DH (Prohibit RMW)
B3E R/W 0 CS select 0: Disable 1: Enable
B3REC
0 Dummy cycle 0:No insert 1: Insert BEXWW3 BEXWW2 BEXWW1 BEXWW0 BEXWR3 R/W 0 0 1 0 0
Read waits 0010: 1 wait 0110: 3 waits 1000: 5 waits 1010: 7 waits 1100: 9 waits 1110: 12 waits 0100: 20 waits
B3OM0 R/W 0 0 00: ROM/SRAM 01: Reserved 10: Reserved 11: Reserved
B3OM1
B3BUS1
B3BUS0
0 0 Data bus width 00: 8 bits 01: 16 bits 10: Reserved 11: Don't set BEXWR2 BEXWR1 BEXWR0 0 1 0
Write waits
BEXCSL
BLOCK EX CS/WAIT control register low
0001: 0 waits
0158H 0101: 2 waits (Prohibit 0111: 4 waits RMW) 1001: 6 waits
1011: 8 waits 1101: 10 waits 1111: 16 waits Others: Reserved
0001: 0 waits 0101: 2 waits 0111: 4 waits 1001: 6 waits 1011: 8 waits 1101: 10 waits 1111: 16 waits Others: Reserved
0010: 1 wait 0110: 3 waits 1000: 5 waits 1010: 7 waits 1100: 9 waits 1110: 12 waits 0100: 20 waits
0011: 6 states + WAIT pin input mode
0011: 6 states + WAIT pin input mode
BEXREC BLOCK EX CS/WAIT control register high 0159H (Prohibit RMW) 0 Dummy cycle 0:No insert 1: Insert
BEXCSH
BEXOM0 R/W 0 0 00: ROM/SRAM 01: Reserved 10: Reserved 11: Reserved
BEXOM1
BEXBUS1 BEXBUS0 0 0 Data bus width 00: 8 bits 01: 16 bits 10: Reserved 11: Don't set
92CF26A-711
2007-11-21
TMP92CF26A
(3) Memory controller (3/4) Symbol
MAMR0
Name
Memory address mask register 0 Memory start address register 0 Memory address mask register 1 Memory start address register 1 Memory address mask register 2 Memory start address register 2 Memory address mask register 3 Memory start address register 3
Address
0142H
7
M0V20 1 M0S23
6
M0V19 1 M0S22 1 M1V20 1 M1S22 1 M2V21 1 M2S22 1 M3V21 1 M3S22 1
5
M0V18
4
M0V17
3
M0V16
2
M0V15
1
M0V14-9 1 M0S17 1 MV15-9 1 M1S17 1 M2V16 1 M2S17 1 M3V16 1 M3S17 1
0
M0V8 1 M0S16 1 M1V8 1 M1S16 1 M2V15 1 M2S16 1 M3V15 1 M3S16 1
MSAR0
0143H
1 M1V21
MAMR1
0146H
1 M1S23
MSAR1
0147H
1 M2V22
MAMR2
014AH
1 M2S23
MSAR2
014BH
1 M3V22
MAMR3
014EH
1 M3S23
MSAR3
014FH
1
R/W 1 1 1 1 0: Compare enable 1: Compare disable M0S21 M0S20 M0S19 M0S18 R/W 1 1 1 1 Set start address A23 to A16 M1V19 M1V18 M1V17 M1V16 R/W 1 1 1 1 0: Compare enable 1: Compare disable M1S21 M1S20 M1S19 M1S18 R/W 1 1 1 1 Set start address A23 to A16 M2V20 M2V19 M2V18 M2V17 R/W 1 1 1 1 0: Compare enable 1: Compare disable M2S21 M2S20 M2S19 M2S18 R/W 1 1 1 1 Set start address A23 to A16 M3V20 M3V19 M3V18 M3V17 R/W 1 1 1 1 0: Compare enable 1: Compare disable M3S21 M3S20 M3S19 M3S18 R/W 1 1 1 1 Set start address A23 to A16
92CF26A-712
2007-11-21
TMP92CF26A
(3) Memory controller (4/4) Symbol Name
Page ROM control register
Address
7
6
5
4
OPGE 0 ROM page access 0: Disable 1: Enable
3
OPWR1
2
1
PR1
0
PR0
PMEMCR
0166H
OPWR0 R/W 0 0 Wait number on page
00: 1 CLK (n-1-1-1 mode) 01: 2 CLK (n-2-2-2 mode) 10: 3 CLK (n-3-3-3 mode) 11: Reserved
1 0 Byte number in a page 00: 64 bytes 01: 32 bytes 10: 16 bytes 11: 8 bytes TAC1 R/W 0 0
Select delay time(TAC) 00:0 x fSYS 01:1 x fSYS 10:2 x fSYS 11:Reserved
CSTMGC
Adjust for Timing of control signal
0168H
TACSEL1 TACSEL0 R/W 0 0 Select area to change timing 00:CS0 01:CS1 10:CS2 11:CS3 TCWSEL1 TCWSEL0 TCWS1 0 TCWS0 R/W 0
TAC0
TCWH1 0
TCWH0 0
Adjust for Timing of WRTMGCRR control signal
0169H
0 0 Select area to change timing 00:CS0 01:CS1 10:CS2 11:CS3
B1TCRS1 B1TCRS0 B1TCRH1 B1TCRH0
Select delay time(TCWS) 00:0.5 x fSYS 01:1.5 x fSYS 10:2.5 x fSYS 11:3.5 x fSYS B0TCRS1 B0TCRS0
Select delay time(TCWH) 00:0.5 x fSYS 01:1.5 x fSYS 10:2.5 x fSYS 11:3.5 x fSYS B0TCRH1 B0TCRH0
R/W
RDTMGCR0
Adjust for Timing of control signal
0 016AH
0
0
0
0
0
0
0
Select delay time(TCRS) 00:0.5 x fSYS 01:1.5 x fSYS 10:2.5 x fSYS 11:3.5 x fSYS B3TCRS1 B3TCRS0
Select delay time(TCRH) 00:0 x fSYS 01:1 x fSYS 10:2 x fSYS 11:3 x fSYS B3TCRH1 B3TCRH0
Select delay time(TCRS) 00:0.5 x fSYS 01:1.5 x fSYS 10:2.5 x fSYS 11:3.5 x fSYS B2TCRS1 B2TCRS0
Select delay time(TCRH) 00:0 x fSYS 01:1 x fSYS 10:2 x fSYS 11:3 x fSYS B2TCRH1 B2TCRH0
R/W
RDTMGCR1
Adjust for Timing of control signal
0 016BH
0
0 00:0 xx fSYS 01:1 x fSYS 10:2 x fSYS 11:3 x fSYS
0
0
0
0
0
Select delay time(TCRS) 00:0.5 x fSYS 01:1.5 x fSYS 10:2.5 x fSYS 11:3.5 x fSYS
Select delay time(TCRH)
Select delay time(TCRS) 00:0.5 x fSYS 01:1.5 x fSYS 10:2.5 x fSYS 11:3.5 x fSYS
Select delay time(TCRH) 00:0 x fSYS 01:1 x fSYS 10:2 x fSYS 11:3 x fSYS
BROMCR
Boot Rom control register
016CH
ROMLESS R/W 1 0/1 Nand-Flash Boot Area CS ROM Output 0: Use 0:enable 1: No use 1:disable
CSDIS
VACE 1/0 Vector address 0: Disable 1: Enable -
RAMCR
RAM control register
R/W 016DH 1 Always write "1"
92CF26A-713
2007-11-21
TMP92CF26A
(4) TSI Symbol Name
Address
7
TSI7 R/W 0
6
INGE R/W 0
5
PTST R 0
4
TWIEN R/W 0 INT4 interrupt control 0: Disable 1: Enable DB64 R/W 0 64
3
PYEN R/W 0 SPY 0 : OFF 1 : ON
2
PXEN R/W 0 SPX 0 : OFF 1 : ON
1
MYEN R/W 0 SMY 0 : OFF 1 : ON
0
MXEN R/W 0 SMX 0 : OFF 1 : ON
TSI TSICR0 control register0 01F0H
0: Disable Input gate Detection 1: Enable control of condition Port 0: no 96,97 touch 0: Enable 1: touch 1: Disable DBC7 DB1024 0 1024 DB256 0 256
DB8 0 8
DB4 0 4
DB2 0 2
DB1 0 1
TSI TSICR1 control register1 01F1H
0 0: Disable 1: Enable
Debounce time is set by the formula "(N*64-16) / fSYS". "N" is the number of bits between bit6 and bit0 which are set to "1".
92CF26A-714
2007-11-21
TMP92CF26A
(5) SDRAM controller Symbol Name
Address
7
SRDS 1
6
- 0 Always write "0"
5
R/W 0
4
3
SPRE 0
Read/Write commands 0: Without auto precharge 1: With auto precharge
2
1
0
SMAC R/W 0 SDRAM controller 0: Disable 1: Enable
SMUXW1 SMUXW0 0
SDACR
SDRAM access control register
0250H
Read data shift function 0: Disable 1: Enable
Address multiplex type 00: Type A (A9- ) 01: Type B (A10- ) 10: Type C (A11- ) 11: Reserved
STMRD SDRAM Command Interval Setting Register 1 0251H TMRD 0: 1 CLK 1: 2 CLK
STWR 1 TWR 0: 1 CLK 1: 2 CLK
STRP 1 TRP 0: 1 CLK 1: 2 CLK
STRCD R/W 1 TRCD 0: 1 CLK 1: 2 CLK
STRC2 1 TRC 000: 1 CLK 001: 2 CLK 010: 3 CLK
STRC1 0 100: 5 CLK 101: 6 CLK 110: 7 CLK
STRC0 0
SDCISR
SDRCR
SDRAM refresh control register
0252H
- R/W 0 Always write "0"
SSAE 1 Self Refresh auto exit function 0:Disable 1:Enable
011: 4 CLK SRS2 SRS1 R/W 0 0 Refresh interval 000: 47 states 001: 78 states 011: 312 states
111: 8 CLK SRS0 SRC 0 0 Auto Refresh 0:Disable
100: 468 states 101: 624 states
010: 156 states 110: 936 states
111: 1248 states 1:Enable
SCMM1 R/W 0 0 Command issue 000: Don't care
SCMM2
SCMM0 0
001: Initialization sequence SDCMM SDRAM command register 0253H a. Precharge All command b. Eight Auto Refresh commands c. Mode Register Set command 010: Precharge All command 100: Reserved 101: Self Refresh Entry command 110: Self Refresh Exit command Others: Reserved SDBL5 SDRAM HDRAM burst length register 0 0254H For HDMA5 SDBL4 0 For HDMA4 SDBL3 0 For HDMA3 SDBL2 0 For HDMA2 SDBL1 0 For HDMA1 SDBL0 0 For HDMA0
SDBLS
HDMA burst length 0:1 Word Read / Single Write 1:Full Page Read / Burst Write
92CF26A-715
2007-11-21
TMP92CF26A
(6) LCD controller (1/6) Symbol Name
Address
7
6
5
SCPW1
4
SCPW0
3
MODE3
2
MODE2
1
MODE1
0
MODE0
RAMTYPE1 RAMTYPE0
0 Display RAM LCD LCDMODE0 mode0 register
0
00: Internal RAM 01: External SRAM 0280H 10: SDRAM 11: Reserved
R/W 1 1 0 0 LD bus transfer speed Mode setting SCPW2= 0 0000 : Reserved 00: 2-clock 0001 : SR (mono) 01: 4-clock 0010 : SR (4Gray) 10: 8-clock 0011 : Reserved 11: 16-clock SCPW2= 1 00: 6-clock 01: 12-clock 10: 24-clock 11: 48-clock 0100 : SR (16Gray) 0101 : SR (64Gray) 0110 : STN (256 color) 0111 : STN (4096 color) LDINV R/W 0 LD bus Inversion
0: Normal 1: Inversion AUTOINV INTMODE
0
0
1000 : STN (64k color) 1001 : Reserved 1010 : TFT (256 color) 1011 : TFT (4096 color) 1100 : TFT (64k color) 1101 : TFT256k,16M (color) 1110 : Reserved 1111 : Reserved
FREDGE SCPW2
LDC2 0 LCD MODE1 LCD mode1 register
LDC1 0
LDC0 0
Data rotation function (Supported for 64K-color: 16bps only)
0 Auto bus inversion 0: Disable 1: enable
0
Interrupt selection 0:LLOAD
W 0
FR edge 0: LHSYNC front edge 1:LHSYNC
W 0
LD bus transfer speed 0: normal 1: 1/3
0281H
000: Normal 010: Vertical flip
100: 90-degree 110: Reserved 111: Reserved
001: Horizontal flip 101: Reserved
back edge (Valid only 1:LVSYNC for TFT)
011: Horizontal & vertical flip
LCD divide LCDDVM0 frame0 register LCD divide LCDDVM1 frame1 register
FMP3 0283H 0 FMP7 0288H 0 COM3 0
FMP2 0 FMP6 0 COM2 R/W 0
FMP1 0 FMP5 0 COM1 0
FMP0 R/W 0 FMP4 R/W 0 COM0 0
FML3 0 FML7 0 SEG3
FML2 0 FML6 0 SEG2 R/W
FML1 0 FML5 0 SEG1 0
FML0 0 FML4 0 SEG0 0
LCP0 DVM (bits 3-0)
LHSYNC DVM (bits 3-0)
LCP0 DVM (bits 7-4)
LHSYNC DVM (bit 7-4)
LCD size LCDSIZE register
0284H
Common setting 0000 : reserved 0001 : 64 0010 : 96 0011 : 120 0100 : 128 0101 : 160 0110 : 200 0111 : 240 PIPE 0
PIP function Data 0:Normal
1000 : 320 1001 : 480 1010 : Reserved 1011 : Reserved 1100 : Reserved 1101 : Reserved 1110 : Reserved 1111 : Reserved FRMON R/W 0 FR divide setting - 0 Always write "0"
0 0 Segment setting 0000 : Reserved 0001 : 64 0010 : 128 0011 : 160 0100 : 240 0101 : 320 0110 : 480 0111 : 640 DLS 0
FR signal LCP0/Line
1000 : Reserved 1001 : Reserved 1010 : Reserved 1011 : Reserved 1100 : Reserved 1101 : Reserved 1110 : Reserved 1111 : Reserved LCP0OC R/W 0
LCP0 0: Always output 1: At valid data only LLOAD width 0: At setting in register 1: At valid data only
ALL0 0
Segment
START 0 LCDC operation 0: Stop 1: Start
LCD LCDCTL0 control0 register
0:Disable
selection
0:Line 1:LCP0
0285H
1:Enable
1: Always 0: Disable output "0" 1: Enable
92CF26A-716
2007-11-21
TMP92CF26A
(6) LCD controller (2/6) Symbol Name
Address
7
LCP0P R/W 1 LCP0
6
LHSP R/W 0 LHSYNC phase 0:Rising 1: Falling
5
LVSP R/W 1 LVSYNC phase 0:Rising 1: Falling
4
LLDP R/W 0 LLOAD phase 0:Rising 1: Falling
3
2
1
LVSW1 R/W 0
LVSYNC
0
LVSW0 R/W 0
LCDCTL1
LCD control1 register
0286H
phase 0:Rising 1:Falling
enable time control 00: 1 clock of LHSYNC 01: 2 clocks of LHSYNC 10: 3 clocks of LHSYNC 11: Reserved
LGOE2P LCD LCDCTL2 control2 register 0 LGOE2 phase 0: Rising 1: Falling LHSYNC LCDHSP Pulse register 028AH LH7 0 LH15 028BH 0 LVP7 028CH 0
0287H
LGOE1P R/W 0 LGOE1 phase 0: Rising 1: Falling LH6 0 LH14 0 LVP6 0
LGOE0P 0 LGOE0 phase 0: Rising 1: Falling LH5 0 LH13 0 LVP5 0 LH4 W 0 LH12 W 0 LVP4 W 0 0 0 0 LVP9 0 LVP8 W 0 (bits 9-8) LVSYNC period (bits 7-0) 0 LVP3 0 LVP2 0 LVP1 0 LVP0 LHSYNC period (bits 15-8) 0 LH11 0 LH10 0 LH9 0 LH8 LHSYNC period (bits 7-0) LH3 LH2 LH1 LH0
LHSYNC LCDHSP Pulse register
LVSYNC LCDVSP Pulse register
LVSYNC LCDVSP Pulse register 028DH 0
LVSYNC period PLV6 028EH 0 HSD6 028FH 0 PDT R/W 0 0 0 0 LDD6 PLV5 0 HSD5 0 LDD5 PLV4 0 HSD4 0 LDD4 PLV3 W 0 HSD3 W 0 LDD3 W 0 0 0 0 0 LDD2 0 LDD1 0 LDD0 LHSYNC delay (bits 6-0) 0 HSD2 0 HSD1 0 HSD0 Front dummy LVSYNC (bits 6-0) PLV2 PLV1 PLV0
LVSYNC
LCDPRVSP Pre Pulse
register
LHSYNC
LCDHSDLY
Delay register
LLOAD
LCDLDDLY
Delay register
0290H
Data output timing 0: Sync with LLOAD 1: 1 clock later than LLOAD
LLOAD delay (bits 6-0)
92CF26A-717
2007-11-21
TMP92CF26A
(6) LCD controller (3/6) Symbol Name
LGOE0
LCDO0DLY Delay
Address
7
6
OE0D6
5
OE0D5 0 OE1D5 0 OE2D5 0 HSW5 0 LDW5 0 O0W5 0 O1W5 0 O2W5 0 O1W9 0 (bits 9-8)
4
OE0D4 0
3
OE0D3 W
2
OE0D2
1
OE0D1 0 OE1D1 0 OE2D1 0 HSW1 0 LDW1 0 O0W1 0 O1W1 0 O2W1 0 LDW8 0
0
OE0D0 0 OE1D0 0 OE2D0 0 HSW0 0 LDW0 0 O0W0 0 O1W0 0 O2W0 0 HSW8 0
LHSYNC width (bit 8)
0291H 0 OE1D6 0292H 0 OE2D6 0293H 0 HSW7 0294H 0 LDW7 0 LDW6 0 O0W6 0 O1W6 0 O2W6 0 O2W8 0 (bits 9-8) 0 LDW4 W 0 O0W7 0 O0W4 W 0 O1W7 0297H 0 O2W7 0298H 0 O2W9 0 O1W4 W 0 O2W4 W 0 O1W8 W 0299H 0 0 HSW6 0 0
register
0 0 OE0 delay (bits 6-0) OE1D3 W 0 0 OE1 delay (bits 6-0) OE2D3 W 0 0 OE2 delay (bits 6-0) HSW3 W 0 LDW3 0 O0W3 0 O1W3 0 O2W3 0 O0W8 0
LGOE0 width (bit 8)
LGOE1
LCDO1DLY Delay
OE1D4
OE1D2
register
LGOE2
LCDO2DLY Delay
OE2D4
OE2D2
register
LHSYNC LCDHSW Width register
HSW4
HSW2 0 LDW2 0 O0W2 0 O1W2 0 O2W2 0 LDW9 0
Setting bit7-0 for LHSYNC Width LLOAD LCDLDW width register 0295H
LHSYNC width (bits 7-0) LGOE0
LCDHO0W
width register
0296H
LLOAD width (bits 7-0) LGOE1
LCDHO1W
width register
LGOE1 width (bits 7-0) LGOE2
LCDHO2W
width register
LGOE2 width (bits 7-0) Bit8,9
LCDHWB8
for signal width register
LGOE2 width
LGOE1 width
LLOAD width (bits 9-8)
92CF26A-718
2007-11-21
TMP92CF26A
(6) LCD controller (4/6) Symbol
LSAML
Name
Start address register LCD main-L Start address register LCD main-M Start address register LCD main-H Start address register LCD sub-L Start address register LCD sub -M Start address register LCD sub -H Hot point register LCD sub -X Hot point register LCD sub -X
Address
02A0H
7
LMSA7 0 LMSA15
6
LMSA6 0 LMSA14 0 LMSA22 1 LSSA6 0 LSSA14 0 LSSA22 1 SAHX6 0
5
LMSA5
4
3
2
1
LMSA1 0 LMA9 0 LMSA17 0 LSSA1 0 LSSA9 0 LSSA17 0 SAHX1 0 SAHX9 R/W
0
LSAMM
02A1H
0 LMSA23
LSAMH
02A2H
0 LSSA7
LSASL
02A4H
0 LSSA15
LSASM
02A5H
0 LSSA23
LSASH
02A6H
0 SAHX7
LSAHX
02A8H
0
LMSA4 LMSA3 LMSA2 R/W 0 0 0 0 LCD main area start address (A7-A1) LMSA13 LMSA12 LMSA11 LMSA10 R/W 0 0 0 0 LCD main area start address (A15-A8) LMSA21 LMSA20 LMSA19 LMSA18 R/W 0 0 0 0 LCD main area start address (A23-A16) LSSA5 LSSA4 LSSA3 LSSA2 R/W 0 0 0 0 LCD sub area start address (A7-A1) LSSA13 LSSA12 LSSA11 LSSA10 R/W 0 0 0 0 LCD sub area start address (A15-A8) LSSA21 LSSA20 LSSA19 LSSA18 R/W 0 0 0 0 LCD sub area start address (A23-A16) SAHX5 SAHX4 SAHX3 SAHX2 R/W 0 0 0 0 LCD sub area HOT point (7-0)
LMSA8 0 LMSA16 0
LSSA8 0 LSSA16 0 SAHX0 0 SAHX8
LSAHX
02A9H
LSAHY
Hot point register LCD sub -Y
SAHY7 02AAH 0
SAHY6 0
SAHY5 0
SAHY4 R/W
SAHY3
SAHY2 0
0 0 LCD sub area HOT point (9-8) SAHY1 SAHY0 0 0 SAHY8 R/W 0 LCD sub area HOT point (9-8) SAS0 0 SAS8 R/W
0 0 LCD sub area HOT point (7-0)
LSAHY
Hot point register LCD sub -Y Segment size register LCD sub Segment size register LCD sub Common size register LCD sub Common size register LCD sub
02ABH
SAS7 02ACH 0
SAS6 0
SAS5 0
SAS4 R/W
SAS3
SAS2
SAS1 0 SAS9
LSASS
0 0 0 LCD sub area segment size (7-0)
LSASS
02ADH
SAC7 02AEH 0
SAC6 0
SAC5 0
SAC4 R/W
SAC3
SAC2
0 0 LCD sub area segment size (9-8) SAC1 SAC0 0 0 SAC8 R/W 0 LCD sub area common size (8)
LSACS
0 0 0 LCD sub area common size (7-0)
LSACS
02AFH
92CF26A-719
2007-11-21
TMP92CF26A
(7) PMC Symbol Name
Address
02A0H
System Reset State
7
PCM_ON R/W 0 Data retained Power Cut Mode 0: Disable 1: Enable
6
5
4
3
2
- W 0 -
1
WUTM1 R/W 0 Data retained
0
WUTM0 R/W 0 Data retained
PMC PMCCTL Control Register
Hot Reset State
Warm-up time Must be 9 written as 0 00: 2 (15.625 ms) 10 01: 2 (31.25 ms) Always read as "0 10: 2 11: 2
11 12
(62.5 ms) (125 ms)
92CF26A-720
2007-11-21
TMP92CF26A
(8) USB controller (1/6) Symbol
Descriptor RAM0
Name
Descriptor RAM 0 register Descriptor RAM 1 register Descriptor RAM 2 register Descriptor RAM 3 register : : Descriptor
Address
0500H
7
D7
Undefined
6
D6
Undefined
5
D5
Undefined
4
D4 R/W
Undefined
3
D3
Undefined
2
D2
Undefined
1
D1
Undefined
0
D0
Undefined
D7 0501H
Undefined
D6
Undefined
D5
Undefined
D4 R/W
Undefined
D3
Undefined
D2
Undefined
D1
Undefined
D0
Undefined
Descriptor RAM1
D7 0502H
Undefined
D6
Undefined
D5
Undefined
D4 R/W
Undefined
D3
Undefined
D2
Undefined
D1
Undefined
D0
Undefined
Descriptor RAM2
D7 0503H
Undefined
D6
Undefined
D5
Undefined
D4 R/W
Undefined
D3
Undefined
D2
Undefined
D1
Undefined
D0
Undefined
Descriptor RAM3
: :
: : D7 067DH
Undefined Undefined Undefined
: : D6 D5 D4 R/W
Undefined Undefined Undefined Undefined Undefined
D3
D2
D1
D0
Descriptor RAM381 RAM 381
register Descriptor Descriptor RAM382 RAM 382 register Descriptor
Descriptor RAM383 RAM 383
D7 067EH
Undefined
D6
Undefined
D5
Undefined
D4 R/W
Undefined
D3
Undefined
D2
Undefined
D1
Undefined
D0
Undefined
D7 067FH
Undefined
D6
Undefined
D5
Undefined
D4 R/W
Undefined
D3
Undefined
D2
Undefined
D1
Undefined
D0
Undefined
register Endpoint 0 register
EP0_DATA7 EP0_DATA6 EP0_DATA5 EP0_DATA4 EP0_DATA3 EP0_DATA2 EP0_DATA1 EP0_DATA0
Endpoint0
0780H
Undefined Undefined Undefined
R/W
Undefined Undefined Undefined Undefined Undefined EP1_DATA7 EP1_DATA6 EP1_DATA5 EP1_DATA4 EP1_DATA3 EP1_DATA2 EP1_DATA1 EP1_DATA0
Endpoint1
Endpoint 1 register
0781H
Undefined Undefined Undefined
R/W
Undefined Undefined Undefined Undefined Undefined EP2_DATA7 EP2_DATA6 EP2_DATA5 EP2_DATA4 EP2_DATA3 EP2_DATA2 EP2_DATA1 EP2_DATA0
Endpoint2
Endpoint 2 register
0782H
Undefined Undefined Undefined
R/W
Undefined Undefined Undefined Undefined Undefined EP3_DATA7 EP3_DATA6 EP3_DATA5 EP3_DATA4 EP3_DATA3 EP3_DATA2 EP3_DATA1 EP3_DATA0
Endpoint3
Endpoint 3 register Endpoint 1 mode register Endpoint 2 mode register Endpoint 3 mode register
0783H
Undefined Undefined Undefined
R/W
Undefined Undefined Undefined Undefined Undefined
Payload[2] Payload[1] Payload[0] 0789H 0 078AH 0 078BH 0 0 0 0 0 0 0
Mode[1] 0 Mode[1] 0 Mode[1] 0
Mode[0] 0 Mode[0] 0 Mode[0] 0
Direction 0 Direction 0 Direction 0
EP1_MODE
R/W Payload[2] Payload[1] Payload[0]
EP2_MODE
R/W Payload[2] Payload[1] Payload[0]
EP3_MODE
R/W
92CF26A-721
2007-11-21
TMP92CF26A
(8) USB controller (2/6) Symbol
EP0_STATUS
Name
Endpoint 0 status register
Address
0790H
7
6
TOGGLE
5
SUSPEND
4
STATUS[2]
3
STATUS[1]
2
1
0
STATUS[0] FIFO_DISABLE STAGE_ERR
R 0 TOGGLE 0 1 1 R 0 TOGGLE 0 1 1 R 0 TOGGLE 0 1 1 R 0 0 1 R 1 0 0 0 1 0 0 0 1 1 0 0
PKT_ACTIVE DATASIZE6 DATASIZE5 DATASIZE4 DATASIZE3 DATASIZE2 DATASIZE1 DATASIZE0
1
0
0
Endpoint 1 EP1_STATUS status register Endpoint 2 status register Endpoint 3 status register
SUSPEND STATUS[2] STATUS[1] STATUS[0] 1
FIFO_DISABLE STAGE_ERR
0791H
0
0
SUSPEND STATUS[2] STATUS[1] STATUS[0] 1
FIFO_DISABLE STAGE_ERR
EP2_STATUS
0792H
0
0
SUSPEND STATUS[2] STATUS[1] STATUS[0]
FIFO_DISABLE STAGE_ERR
EP3_STATUS
0793H
Endpoint 0 size EP0_SIZE_L_A register Low A Endpoint 0 size EP1_SIZE_L_A register Low A Endpoint 2 size register Low A Endpoint 3 size EP3_SIZE_L_A register Low A Endpoint 1 size EP1_SIZE_L_B register Low B Endpoint 2 size EP2_SIZE_L_B register Low B Endpoint 3 size EP3_SIZE_L_B register Low B Endpoint 1 size register High A Endpoint 2 size EP2_SIZE_H_A register High A Endpoint 3 size EP3_SIZE_H_A register HighA
0798H
PKT_ACTIVE DATASIZE6 DATASIZE5 DATASIZE4 DATASIZE3 DATASIZE2 DATASIZE1 DATASIZE0
0799H 1 0 0 0
R 1 0 0 0
PKT_ACTIVE DATASIZE6 DATASIZE5 DATASIZE4 DATASIZE3 DATASIZE2 DATASIZE1 DATASIZE0
EP2_SIZE_L_A
079AH 1 0 0 0
R 1 0 0 0
PKT_ACTIVE DATASIZE6 DATASIZE5 DATASIZE4 DATASIZE3 DATASIZE2 DATASIZE1 DATASIZE0
079BH 1 0 0 0
R 1 0 0 0
PKT_ACTIVE DATASIZE6
DATASIZE5 DATASIZE4 DATASIZE3 DATASIZE2 DATASIZE1 DATASIZE0
07A1H 0 0 0 0
R 1 0 0 0
PKT_ACTIVE DATASIZE6 DATASIZE5 DATASIZE4 DATASIZE3 DATASIZE2 DATASIZE1 DATASIZE0
07A2H 0 0 0 0
R 1 0 0 0
PKT_ACTIVE DATASIZE6 DATASIZE5 DATASIZE4 DATASIZE3 DATASIZE2 DATASIZE1 DATASIZE0
07A3H 0 0 0 0
R 1 0 0 0
DATASIZE9 DATASIZE8 DATASIZE7
EP1_SIZE_H_A
07A9H 0
R 0 0
DATASIZE9 DATASIZE8 DATASIZE7
07AAH 0
R 0 0
DATASIZE9 DATASIZE8 DATASIZE7
07ABH 0
R 0 0
92CF26A-722
2007-11-21
TMP92CF26A
(8) USB controller (3/6) Symbol Name
Address
07B1H 0
7
6
5
4
3
2
1
R 0
0
Endpoint 1 size EP1_SIZE_H_B register High B Endpoint 2 size EP2_SIZE_H_B register High B Endpoint 0 size EP3_SIZE_H_B register High B
bmRequestbmRequestType Type register
DATASIZE9 DATASIZE8 DATASIZE7 0
DATASIZE9 DATASIZE8 DATASIZE7 07B2H 0 R 0 0
DATASIZE9 DATASIZE8 DATASIZE7 07B3H 0 R 0 0
DIRECTION REQ_TYPE1 REQ_TYPE0 RECIPIENT4 RECIPIENT3 RECIPIENT2 RECIPIENT1 RECIPIENT0
07C0H 0 07C1H 0 0 0 0 0 0 0
R 0 R 0 R 0 0 0 0 R 0 0 0 0 R 0 0 0 0 R 0 0 0 0 R 0 0 0 0 R 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 INDEX_H7 INDEX_H6 INDEX_H5 INDEX_H4 INDEX_H3 INDEX_H2 INDEX_H1 INDEX_H0 0 0 0 0 INDEX_L7 INDEX_L6 INDEX_L5 INDEX_L4 INDEX_L3 INDEX_L2 INDEX_L1 INDEX_L0 0 0 0 0 VALUE_H7 VALUE_H6 VALUE_H5 VALUE_H4 VALUE_H3 VALUE_H2 VALUE_H1 VALUE_H0 0 0 0 VALUE_L7 VALUE_L6 VALUE_L5 VALUE_L4 VALUE_L3 VALUE_L2 VALUE_L1 VALUE_L0 0 0 0 REQUEST7 REQUEST6 REQUEST5 REQUEST4 REQUEST3 REQUEST2 REQUEST1 REQUEST0
bRequest
bRequest register wValue register Low wValue register High wIndex register Low wIndex register High wLength register Low wLength register High
wValue_L
07C2H
wValue_H
07C3H
wIndex_L
07C4H
wIndex_H
07C5H
LENGTH_L7 LENGTH_L6 LENGTH_L5 LENGTH_L4 LENGTH_L3 LENGTH_L2 LENGTH_L1 LENGTH_L0
wLength_L
07C6H
LENGTH_H7 LENGTH_H6 LENGTH_H5 LENGTH_H4 LENGTH_H3 LENGTH_H2 LENGTH_H1 LENGTH_H0
wLength_H
07C7H
92CF26A-723
2007-11-21
TMP92CF26A
(8) USB controller (4/6) Symbol
SetupReceived
Name
SetupReceived register Current_
Address
07C8H
7
D7 0
REMOTEWAKEUP
6
D6 0
5
D5 0
4
D4 W 0
3
D3 0 R
2
D2 0
1
D1 0
CONFIG[1]
0
D0 0
CONFIG[0]
ALTERNATE[1] ALTERNATE[0] INTERFACE[1] INTERFACE[0]
Current_Config
Config register
07C9H
R 0 0 0
G_CONFIG
0 R
0
0
0
StandardStandard Request Request register Request register
S_INTERFACE G_INTERFACE S_CONFIG
G_DESCRIPT S_FEATURE C_FEATURE G_STATUS
07CAH 0 07CBH 0 0
EP2_DSET_B
0
0
0
0
VENDOR
0
CLASS
0
ExSTANDARD
0
STANDARD
SOFT_RESET G_PORT_STS G_DEVICE_ID
Request
R 0
EP2_DSET_A
0
EP1_DSET_B
0
EP1_DSET_A
0
0
EP0_DSET_A
DATASET1
DATASET 1 register
EP3_DSET_B
EP3_DSET_A
07CCH 0 0
EP7_DSET_A
R 0
EP6_DSET_B
R 0
EP6_DSET_A
0
EP5_DSET_B
0
EP5_DSET_A EP4_DSET_B
0
EP4_DSET_A
DATASET2
DATASET 2 register
EP7_DSET_B
07CDH 0 0 0 0
R 0 0 R/W 0 0
EP1_EOPB
0 R
0 Default 1
EP0_EOPB
USB_STATE
USB state register
Configured Addressed 07CEH
EOP
EOP register
EP7_EOPB
EP6_EOPB
EP5_EOPB
EP4_EOPB
EP3_EOPB
EP2_EOPB
07CFH 1 1
EP[2]
W 1
EP[1]
1
EP[0]
1 W
1
1
1
COMMAND
Command register Endpoint 1 single register Endpoint 1 BCS register Interrupt control register
Command[3] Command[2] Command[1] Command[0]
07D0H 0
EP3_SELECT EP2_SELECT
0
EP1_SELECT
0
0
EP3_SINGLE
0
EP2_SINGLE
0
EP1_SINGLE
0
EPx_SINGLE1
07D1H 0
EP3_SELECT
R/W 0
EP2_SELECT
R/W 0
EP1_SELECT
0
EP3_BCS
0
EP2_BCS
0
EP1_BCS
EPx_BCS1
07D3H 0 07D6H
R/W 0 0 0
R/W 0 0 Status_nak R/W 0
INT_Control
Standard Standard Request Request Mode mode register
Request Mode
S_Interface 07D8H 0
G_Interface S_Config 0 0
G_Config 0
G_Descript S_Feature C_Feature 0 0 0
G_Status 0
R/W
Request mode register
Soft_Reset G_Port_Sts G_DeviceId 07D9H 0 R/W 0 0
92CF26A-724
2007-11-21
TMP92CF26A
(8) USB controller (5/6) Symbol
Port Status
Name
Port status register Frame register Low Frame register H
Address
07E0H
7
Reserved7 0 -
6
5
4
Select W 1 T[4] R 0 T[7] 0 A4 0
3
NotError 1 T[3] 0
2
1
0
Reserved6 PaperError 0 T[6] 0 T[9] R 0 A6 0 T[5] 0 T[8] 0 A5 0
Reserved2 Reserved1 Reserved0 0 T[2] 0 CREATE 0 0 T[1] 0 R 1 A1 0 0 A0 0 USBREADY R/W 0
S_D_STALL
0 T[0] 0
FRAME_L
07E1H 0 T[10] 07E2H 0
FRAME_STS1 FRAME_STS0
FRAME_H
ADDRESS
Address register USB
A3 R 0
A2 0
07E3H 0
USBREADY ready
07E6H
register
SetSet Descriptor Descriptor STALL stall register
07E8H
W 0
INT_URST_STR INT_URST_END INT_SUS INT_RESUME INT_CLKSTOP INT_CLKON
USB interrupt USBINTFR1 flag register 1
07F0H (Prohibit RMW) 0 0 0
R/W 0 1: -
EP1_Empty_B EP2_FULL_A EP2_Empty_A EP2_FULL_B EP2_Empty_B
0 0: Clear flag
0
When read 0: Not generate interrupt When write 1: Generate interrupt
EP1_FULL_A EP1_Empty_A EP1_FULL_B
USB interrupt USBINTFR2 flag register 2
07F1H (Prohibit RMW) 0
R/W 0 0 0 0 0 When read 0: Not generate interrupt When write 0: Clear flag 1: Generate interrupt
EP3_FULL_A EP3_Empty_A EP3_FULL_B EP3_Empty_B
0
0
1: -
R/W USB interrupt USBINTFR3 flag register 3 07F2H (Prohibit RMW) 0
When read When write
0
0
0:Not generate interrupt 1:Generate interrupt 0: Clear flag 1: -
0
INT_SETUP
INT_EP0
INT_STAS
INT_STASN
INT_EP1N
INT_EP2N
INT_EP3N
USB interrupt USBINTFR4 flag register 4
07F3H (Prohibit RMW) 0
R/W 0 0 0 When read 0: Not generate interrupt 1: Generate interrupt 0 When write 0 0: Clear flag 1: - 0
92CF26A-725
2007-11-21
TMP92CF26A
(8) USB controller (6/6) Symbol Name
Address
7
6
5
MSK_SUS
4
R/W
3
2
MSK_CLKON
1
0
USB interrupt USBINTMR1 mask register 1 USB interrupt USBINTMR2 mask register 2
MSK_URST_STR MSK_URST_END
MSK_RESUME MSK_CLKSTOP
07F4H 1 1 1
1
1
1
0: Be not masked 1: Be masked
EP1_MSK_FA EP1_MSK_EA EP1_MSK_FB EP1_MSK_EB EP2_MSK_FA EP2_MSK_EA EP2_MSK_FB EP2_MSK_EB
07F5H 1 1 1 1
R/W 1 1 1 1 0: Be not masked 1: Be masked
EP3_MSK_FA EP3_MSK_EA
USB interrupt USBINTMR3 mask register 3
R/W 07F6H 1 1 0: Be not masked 1: Be masked
USB interrupt USBINTMR4 mask register 4
MSK_SETUP
MSK_EP0
MSK_STAS
MSK_STASN
MSK_EP1N
MSK_EP2N
MSK_EP3N
07F7H
1 1
R/W 1 1 1 1 1 SPEED 1 USBCLKE R/W 0 Wake up 0: - 1:Start 0 0: Be not masked 1: Be masked TRNS_USE WAKEUP R/W
USBCR1
USB control register 1
07F8H
0 Transceiver 0:disable 1:enble
92CF26A-726
2007-11-21
TMP92CF26A
(9) Symbol SPIC (1/2) Name
Address
7
SWRST W
6
XEN R/W 0
5
4
3
2
1
R/W
0
CLKSEL2 CLKSEL1 CLKSEL0 1 0 0
0 0820H (Prohibit Software RMW) reset
SYSCK 0: disable 0: don't care 1: enable 1: Reset LOOPBACK
SPI Mode SPIMD Setting register MSB1ST R/W 0 1 0821H LOOPBACK Start bit for (Prohibit Test mode Transmit / RMW)
0:disbale 1:enable Receive 0:LSB 1:MSB
Select Baud Rate 000:Reserved 100: fSYS/8 001: fSYS/2 101: fSYS/16 010: fSYS/3 110: fSYS/64 111: fSYS/256 011: fSYS/4
DOSTAT 1
SPDO pin state (no transmit) 0:fixed to "0" 1:fixed to "1"
TCPOL 0
Synchronous clock edge during transmitting 0: fall 1: rise
RCPOL R/W 0
Synchronou s clock edge during receiving 0: fall 1: rise
TDINV 0
Invert data During transmitting 0: disable 1: enable
RDINV 0
Invert data During receiving 0: disable 1: enable
CEN 0
SPCS_B 1
UNIT16 0
TXMOD R/W 0
TXE 0
Transmit control 0: disable 1: enable
FDPXE 0
Alignment in Full duplex 0: disable 1: enable
RXMOD 0
Receive Mode 0: UNIT 1:Sequential
RXE 0
Receive control 0: disable 1: enable
0822H
SPI SPICT Control register
Communicat SPCS pin -ion control 0: output "0" 0: disable 1: output "1" 1: enable
CRC16_7_B
Data length Transmit 0: 8bit mode 1: 16bit 0: UNIT 1:Sequential
CRCRX_TX_B CRCRESET_B
R/W 0 0823H
CRC select 0: CRC7 1: CRC16
0
CRC data 0: Transmit 1: receive
0
CRC calculate register 0:Reset 1:Release Reset
TEMP R 1
Transmit FIFO Status 0: no space 1: having space
TEND R 1
REND 0
0824H SPI SPIST Status register
Receive Transmit Status Status 0: during 0: during transmissio receiving or -n or having not having transmissio receiving -n data data 1: finish 1: finish or not having space
0825H
TEMPIE 0
TEMP interrupt 0:enable 1:disable
RFULIE 0
RFUL interrupt 0:enable 1:disable
TENDIE 0
TEND interrupt 0:enable 1:disable
RENDIE 0
REND interrupt 0:enable 1:disable
R/W SPI SPIIE Interrupt enable register 082DH 082CH
92CF26A-727
2007-11-21
TMP92CF26A
(9) SPIC (2/2) Symbol Name
Address
7
CRCD7
6
CRCD6 0 CRCD14 0 TXD6 0 TXD14 0 TXD6 0 TXD14 0 RXD6 0 RXD14 0 RXD6 0 RXD14 0
5
CRCD5 0 CRCD13 0 TXD5 0 TXD13 0 TXD5 0 TXD13 0 RXD5 0 RXD13 0 RXD5 0 RXD13 0
4
CRCD4 R 0 CRCD12 R 0 TXD4 R/W 0 TXD12 R/W 0 TXD4 R/W 0 TXD12 R/W 0 RXD4 R 0 RXD12 R 0 RXD4 R 0 RXD12 R 0
3
CRCD3 0 CRCD11 0 TXD3 0 TXD11 0 TXD3 0 TXD11 0 RXD3 0 RXD11 0 RXD3 0 RXD11 0
2
CRCD2 0 CRCD10 0 TXD2 0 TXD10 0 TXD2 0 TXD10 0 RXD2 0 RXD10 0 RXD2 0 RXD10 0
1
CRCD1 0 CRCD9 0 TXD1 0 TXD9 0 TXD1 0 TXD9 0 RXD1 0 RXD9 0 RXD1 0 RXD9 0
0
CRCD0 0 CRCD8 0 TXD0 0 TXD8 0 TXD0 0 TXD8 0 RXD0 0 RXD8 0 RXD0 0 RXD8 0
0826H SPI SPICR CRC register 0827H 0 TXD7 0830H SPI SPITD0 transmissio n data0 register 0831H 0 TXD7 0832H SPI SPITD1 transmissio n data1 register 0833H 0 RXD7 0834H SPI SPIRD0 receive data0 register 0835H 0 RXD7 0836H SPI SPIRD1 receive data1 register 0837H 0 RXD15 0 RXD15 0 0 TXD15 0 TXD15 CRCD15 0
CRC result register [7:0]
CRC result register [15:8]
Transmit data register [7:0]
Transmit data register [15:8]
Transmit data register [7:0]
Transmit data register [15:8]
Receive data register [7:0]
Receive data register [15:8]
Receive data register [7:0]
Receive data register [15:8]
92CF26A-728
2007-11-21
TMP92CF26A
(10) MMU (1/8) Symbol Name
Address
7
X7
6
X6 0
5
X5 0
4
X4 R/W 0
3
X3 0
2
X2 0
1
X1 0
0
X0 0
0880H
0
Set BANK number for LOCAL-X LOCALX register LOCALPX for program 0881H ("0" is disabled because of overlapped with Common-area.) LXE R/W 0 LOCALX BANK 0:disable 1:enable Y5 0882H 0 Set BANK number for LOCAL-X X8-X0 setting and CS 000000000011111111 CSXA 100000000111111111 CSXB Y4 0 Y3 R/W 0 0 0 0 Set BANK number for LOCAL-Y LOCALY register LOCALPY for program 0883H ("3" is disabled because of overlapped with Common-area.) LYE R/W 0 LOCALY BANK 0:disable 1:enable Z7 0884H 0 Z6 0 Z5 0 Z4 R/W 0 0 0 0 0 Set BANK number for LOCAL-Z LOCALZ register LOCALPZ for program 0885H ("3" is disabled because of overlapped with Common-area.) LZE R/W 0 LOCALZ BANK 0:disable 1:enable Set BANK number for LOCAL-Z Z8-Z0 setting and CS 000000000001111111 CSZA 010000000011111111 CSZB 100000000101111111 CSZC 110000000111111111 CSZD Z8 R/W 0 Z3 Z2 Z1 Z0 Y2 Y1 Y0 X8 R/W 0
92CF26A-729
2007-11-21
TMP92CF26A
(10) MMU (2/8) Symbol Name
Address
7
X7
6
X6 0
5
X5 0
4
X4 R/W 0
3
X3 0
2
X2 0
1
X1 0
0
X0 0 X8 R/W 0
0888H 0 LOCALX register LOCALLX for LCD 0889H LXE R/W 0 LOCALX BANK 0:disable 1:enable Y5 088AH 0
Set BANK number for LOCAL-X ("0" is disabled because of overlapped with Common-area.)
Set BANK number for LOCAL-X X8-X0 setting and CS 000000000011111111 CSXA 100000000111111111 CSXB Y4 0 Y3 R/W 0 0 0 0 Set BANK number for LOCAL-Y Y2 Y1 Y0
LOCALY register LOCALLY for LCD
("3" is disabled because of overlapped with Common-area.) LYE R/W 0 088BH LOCALY BANK 0:disable 1:enable Z7 088CH 0 0 0 0 Z6 Z5 Z4 R/W 0 0 0 0 Z8 R/W 0 Set BANK number for LOCAL-Z Z8-Z0 setting and CS 000000000001111111 CSZA 010000000011111111 CSZB 100000000101111111 CSZC 110000000111111111 CSZD Set BANK number for LOCAL-Z ("3" is disabled because of overlapped with Common-area.) Z3 Z2 Z1 Z0
LOCALZ register LOCALLZ for LCD
LZE R/W 0 088DH LOCALZ BANK 0:disable 1:enable
92CF26A-730
2007-11-21
TMP92CF26A
(10) MMU (3/8) Symbol Name
Address
7
X7
6
X6 0
5
X5 0
4
X4 R/W 0
3
X3 0
2
X2 0
1
X1 0
0
X0 0 X8 R/W 0
0890H 0 LOCALX register LOCALRX for read 0891H LXE R/W 0 LOCALX BANK 0:disable 1:enable Y5 0892H 0
Set BANK number for LOCAL-X ("0" is disabled because of overlapped with Common-area.)
Set BANK number for LOCAL-X X8-X0 setting and CS 000000000011111111 CSXA 100000000111111111 CSXB Y4 0 Y3 R/W 0 0 0 0 Set BANK number for LOCAL-Y Y2 Y1 Y0
LOCALY register LOCALRY for read 0893H
("3" is disabled because of overlapped with Common-area.) LYE R/W 0 LOCALY BANK 0:disable 1:enable Z7 0894H 0 0 0 0 Z6 Z5 Z4 R/W 0 0 0 0 Z8 R/W 0 Set BANK number for LOCAL-Z Z8-Z0 setting and CS 000000000001111111 CSZA 010000000011111111 CSZB 100000000101111111 CSZC 110000000111111111 CSZD Set BANK number for LOCAL-Z ("3" is disabled because of overlapped with Common-area.) Z3 Z2 Z1 Z0
LOCALZ register LOCALRZ for read 0895H
LZE R/W 0 LOCALZ BANK 0:disable 1:enable
92CF26A-731
2007-11-21
TMP92CF26A
(10) MMU (4/8) Symbol Name
Address
7
X7
6
X6 0
5
X5 0
4
X4 R/W 0
3
X3 0
2
X2 0
1
X1 0
0
X0 0 X8 R/W 0
0898H 0 LOCALX register LOCALWX for write 0899H LXE R/W 0 LOCALX BANK 0:disable 1:enable Y5 089AH 0
Set BANK number for LOCAL-X ("0" is disabled because of overlapped with Common-area.)
Set BANK number for LOCAL-X X8-X0 setting and CS 000000000011111111 CSXA 100000000111111111 CSXB Y4 0 Y3 R/W 0 0 0 0 Set BANK number for LOCAL-Y Y2 Y1 Y0
LOCALY register LOCALWY for write
("3" is disabled because of overlapped with Common-area.) LYE R/W 0 089BH LOCALY BANK 0:disable 1:enable Z7 089CH 0 0 0 0 Z6 Z5 Z4 R/W 0 0 0 0 Z8 R/W 0 Set BANK number for LOCAL-Z Z8-Z0 setting and CS 000000000001111111 CSZA 010000000011111111 CSZB 100000000101111111 CSZC 110000000111111111 CSZD Set BANK number for LOCAL-Z ("3" is disabled because of overlapped with Common-area.) Z3 Z2 Z1 Z0
LOCALZ register LOCALWZ for write
LZE R/W 0 089DH LOCALZ BANK 0:disable 1:enable
92CF26A-732
2007-11-21
TMP92CF26A
(10) MMU (5/8) Symbol Name
Address
7
X7
6
X6 0
5
X5 0
4
X4 R/W 0
3
X3 0
2
X2 0
1
X1 0
0
X0 0 X8 R/W 0
08A0H 0 LOCALX
LOCALESX
Set BANK number for LOCAL-X ("0" is disabled because of overlapped with Common-area.) LXE R/W 0 08A1H LOCALX BANK 0:disable 1:enable Y5 08A2H 0 Set BANK number for LOCAL-X X8-X0 setting and CS 000000000011111111 CSXA 100000000111111111 CSXB Y4 0 Y3 R/W 0 0 0 0 Set BANK number for LOCAL-Y Y2 Y1 Y0
register for DMA source
LOCALY
LOCALESY
("3" is disabled because of overlapped with Common-area.) LYE R/W 0 08A3H LOCALY BANK 0:disable 1:enable Z7 08A4H 0 0 0 0 Z6 Z5 Z4 R/W 0 0 0 0 Z8 R/W 0 Set BANK number for LOCAL-Z Z8-Z0 setting and CS 000000000001111111 CSZA 010000000011111111 CSZB 100000000101111111 CSZC 110000000111111111 CSZD Set BANK number for LOCAL-Z ("3" is disabled because of overlapped with Common-area.) LZE R/W 0 08A5H LOCALZ BANK 0:disable 1:enable Z3 Z2 Z1 Z0
register for DMA source
LOCALZ
LOCALESZ
register for DMA source
92CF26A-733
2007-11-21
TMP92CF26A
(10) MMU (6/8) Symbol Name
Address
7
X7
6
X6 0
5
X5 0
4
X4 R/W 0
3
X3 0
2
X2 0
1
X1 0
0
X0 0 X8 R/W 0
08A8H 0 LOCALX
LOCALEDX
Set BANK number for LOCAL-X ("0" is disabled because of overlapped with Common-area.) LXE R/W 0 08A9H LOCALX BANK 0:disable 1:enable Y5 08AAH 0 Set BANK number for LOCAL-X X8-X0 setting and CS 000000000011111111 CSXA 100000000111111111 CSXB Y4 0 Y3 R/W 0 0 0 0 Set BANK number for LOCAL-Y Y2 Y1 Y0
register for DMA destination
LOCALY
LOCALEDY
("3" is disabled because of overlapped with Common-area.) LYE R/W 0 08ABH LOCALY BANK 0:disable 1:enable Z7 08ACH 0 0 0 0 Z6 Z5 Z4 R/W 0 0 0 0 Z8 R/W 0 Set BANK number for LOCAL-Z Z8-Z0 setting and CS 000000000001111111 CSZA 010000000011111111 CSZB 100000000101111111 CSZC 110000000111111111 CSZD Set BANK number for LOCAL-Z ("3" is disabled because of overlapped with Common-area.) LZE R/W 0 08ADH LOCALZ BANK 0:disable 1:enable Z3 Z2 Z1 Z0
register for DMA destination
LOCALZ
LOCALEDZ
register for DMA destination
92CF26A-734
2007-11-21
TMP92CF26A
(10) MMU (7/8) Symbol Name
Address
7
X7
6
X6 0
5
X5 0
4
X4 R/W 0
3
X3 0
2
X2 0
1
X1 0
0
X0 0 X8 R/W 0
08B0H 0 LOCALX
LOCALOSX
Set BANK number for LOCAL-X ("0" is disabled because of overlapped with Common-area.) LXE R/W 0 08B1H LOCALX BANK 0:disable 1:enable Y5 08B2H 0 Set BANK number for LOCAL-X X8-X0 setting and CS 000000000011111111 CSXA 100000000111111111 CSXB Y4 0 Y3 R/W 0 0 0 0 Set BANK number for LOCAL-Y Y2 Y1 Y0
register for DMA source
LOCALY
LOCALOSY
("3" is disabled because of overlapped with Common-area.) LYE R/W 0 08B3H LOCALY BANK 0:disable 1:enable Z7 08B4H 0 0 0 0 Z6 Z5 Z4 R/W 0 0 0 0 Z8 R/W 0 Set BANK number for LOCAL-Z Z8-Z0 setting and CS 000000000001111111 CSZA 010000000011111111 CSZB 100000000101111111 CSZC 110000000111111111 CSZD Set BANK number for LOCAL-Z ("3" is disabled because of overlapped with Common-area.) LZE R/W 0 08B5H LOCALZ BANK 0:disable 1:enable Z3 Z2 Z1 Z0
register for DMA source
LOCALZ
LOCALOSZ
register for DMA source
92CF26A-735
2007-11-21
TMP92CF26A
(10) MMU (8/8) Symbol Name
Address
7
X7
6
X6 0
5
X5 0
4
X4 R/W 0
3
X3 0
2
X2 0
1
X1 0
0
X0 0 X8 R/W 0
08B8H 0 LOCALX
LOCALODX
Set BANK number for LOCAL-X ("0" is disabled because of overlapped with Common-area.) LXE R/W 0 08B9H LOCALX BANK 0:disable 1:enable Y5 08BAH 0 Set BANK number for LOCAL-X X8-X0 setting and CS 000000000011111111 CSXA 100000000111111111 CSXB Y4 0 Y3 R/W 0 0 0 0 Set BANK number for LOCAL-Y Y2 Y1 Y0
register for DMA destination
LOCALY
LOCALODY
("3" is disabled because of overlapped with Common-area.) LYE R/W 0 08BBH LOCALY BANK 0:disable 1:enable Z7 08BCH 0 0 0 0 Z6 Z5 Z4 R/W 0 0 0 0 Z8 R/W 0 Set BANK number for LOCAL-Z Z8-Z0 setting and CS 000000000001111111 CSZA 010000000011111111 CSZB 100000000101111111 CSZC 110000000111111111 CSZD Set BANK number for LOCAL-Z ("3" is disabled because of overlapped with Common-area.) LZE R/W 0 08BDH LOCALZ BANK 0:disable 1:enable Z3 Z2 Z1 Z0
register for DMA destination
LOCALZ
LOCALODZ
register for DMA destination
92CF26A-736
2007-11-21
TMP92CF26A
(11) NAND-Flash controller (1/4) Symbol Name
Address
7
WE 0 WE ALE
6
ALE 0
5
CLE 0 CLE control 0: "L" out 1: "H" out
4
CE0 R/W 0 CE0
3
CE1 0 CE1
2
ECCE 0 ECC circuit control
1
BUSY 0 NAND Flash
0
ECCRST 0 ECC
08C0H enable control (Prohibit 0: Disable 0: "L" out RMW) 1: Enable 1: "H" out
control 0: "H" out 1: "L" out
control 0: "H" out 1: "L" out
state
reset control 0: - 1: Reset *Always read as "0".
0: Disable 1: Busy 1: Enable 0: Ready
NANDF NDFMCR0 Control0 Register SPLW1 0 SPLW0 0 SPHW1 0 SPHW0 0 RSECCL 0
ReedSolomon ECC latch 0: Disable 1: Enable
RSEDN 0
ReedSolomon operation 0: Encode (Write) 1: Decode (Read)
RSESTA W 0
RSECGW R/W 0
R/W
Strobe pulse width 08C1H (Low width of NDRE , (Prohibit NDWE ) Strobe pulse width (High width of NDRE , NDWE ) Inserted width = (fSYS) x (set value)
RMW)
Inserted width = (fSYS) x (set value)
ReedReedSolomon Solomon ECC error calculation generator write control start 0: Disable 0: - 1: Enable 1: Start *Always read as "0".
INTERDY R/W 0 08C2H NANDF NDFMCR1 Control1 Register STATE3 08C3H 0 ECCD7 08C4H NANDF NDECCRD0 Code ECC Register0 08C5H 0 ECCD7 08C6H NANDF NDECCRD1 Code ECC Register1 08C7H 0 ECCD15 0 ECCD15 0
Ready interrupt 0: Disable 1: Enable
INTRSC R/W 0
ReedSolomon calculation end interrupt 0: Disable 1: Enable
BUSW R/W 0
Data bus width 0: 8-bit 1: 16-bit
ECCS R/W 0
ECC calculation 0:Hamming 1: ReedSolomon
SYSCKE R/W 0
Clock control 0: Disable 1: Enable
STATE2 0 ECCD6 0 ECCD14 0 ECCD6 0 ECCD14 0
STATE1 R 0 ECCD5 0 ECCD13 0 ECCD5 0 ECCD13 0
STATE0 0 ECCD4 R 0 ECCD12 R 0 ECCD4 R 0 ECCD12 R 0
SEER1
SEER0
Undefined Undefined ECCD3 0 ECCD11 0 ECCD3 0 ECCD11 0 ECCD2 0 ECCD10 0 ECCD2 0 ECCD10 0 ECCD1 0 ECCD9 0 ECCD1 0 ECCD9 0 ECCD0 0 ECCD8 0 ECCD0 0 ECCD8 0
Status read (See the table below.)
NAND Flash ECC Register (7-0)
NAND Flash ECC Register (15-8)
NAND Flash ECC Register (7-0)
NAND Flash ECC Register (15-8)
92CF26A-737
2007-11-21
TMP92CF26A
(11) NAND-Flash controller (2/4) Symbol Name
Address
7
ECCD7
6
ECCD6 0 ECCD14 0 ECCD6 0 ECCD14 0 ECCD6 0 ECCD14 0
5
ECCD5 0 ECCD13 0 ECCD5 0 ECCD13 0 ECCD5 0 ECCD13 0
4
ECCD4 R 0 ECCD12 R 0 ECCD4 R 0 ECCD12 R 0 ECCD4 R 0 ECCD12 R 0
3
ECCD3 0 ECCD11 0 ECCD3 0 ECCD11 0 ECCD3 0 ECCD11 0
2
ECCD2 0 ECCD10 0 ECCD2 0 ECCD10 0 ECCD2 0 ECCD10 0
1
ECCD1 0 ECCD9 0 ECCD1 0 ECCD9 0 ECCD1 0 ECCD9 0
0
ECCD0 0 ECCD8 0 ECCD0 0 ECCD8 0 ECCD0 0 ECCD8 0
08C8H NANDF NDECCRD2 Code ECC Register2 08C9H 0 ECCD7 08CAH NANDF NDECCRD3 Code ECC Register3 08CBH 0 ECCD7 08CCH NANDF NDECCRD4 Code ECC Register4 08CDH 0 ECCD15 0 ECCD15 0 ECCD15 0
NAND Flash ECC Register (7-0)
NAND Flash ECC Register (15-8)
NAND Flash ECC Register (7-0)
NAND Flash ECC Register (15-8)
NAND Flash ECC Register (7-0)
NAND Flash ECC Register (15-8)
92CF26A-738
2007-11-21
TMP92CF26A
(11) NAND-Flash controller (3/4) Symbol Name
Address
7
RS0A7
6
RS0A6 0
5
RS0A5 0
4
RS0A4 R 0
3
RS0A3 0
2
RS0A2 0
1
RS0A1 0 RS0A9 R 0
0
RS0A0 0 RS0A8 0
08D0H 0 NANDF read solomon Result address Register0 08D1H
NAND Flash Reed-Solomon Calculation Result Address Register (7-0)
NDRSCA0
NAND Flash Reed-Solomon Calculation Result Address Register (9-8)
NANDF read NDRSCD0 solomon Result data Register0 08D2H
RS0D7 0
RS0D6 0
RS0D5 0
RS0D4 R 0
RS0D3 0
RS0D2 0
RS0D1 0
RS0D0 0
NAND Flash Reed-Solomon Calculation Result Data Register (7-0) RS1A7 08D4H 0 0 0 0 RS1A6 RS1A5 RS1A4 R 0 0 0 RS1A9 R 0 08D5H 0 NAND Flash ReedSolomon Calculation Result Address Register (9-8) 0 RS1A8 NAND Flash Reed-Solomon Calculation Result Address Register (7-0) RS1A3 RS1A2 RS1A1 RS1A0
NANDF read solomon Result address Register1
NDRSCA1
NANDF read NDRSCD1 solomon Result data Register1 08D6H
RS1D7 0
RS1D6 0
RS1D5 0
RS1D4 R 0
RS1D3 0
RS1D2 0
RS1D1 0
RS1D0 0
NAND Flash Reed-Solomon Calculation Result Data Register (7-0) RS2A7 08D8H 0 RS2A6 0 RS2A5 0 RS2A4 R 0 0 0 0 RS2A9 R 0 08D9H 0 NAND Flash ReedSolomon Calculation Result Address Register (9-8) 0 RS2A8 NAND Flash Reed-Solomon Calculation Result Address Register (7-0) RS2A3 RS2A2 RS2A1 RS2A0
NANDF read solomon Result address Register2
NDRSCA2
NANDF read NDRSCD2 solomon Result data Register2 08DAH
RS2D7 0
RS2D6 0
RS2D5 0
RS2D4 R 0
RS2D3 0
RS2D2 0
RS2D1 0
RS2D0 0
NAND Flash Reed-Solomon Calculation Result Data Register (7-0)
92CF26A-739
2007-11-21
TMP92CF26A
(11) NAND-Flash controller (4/4) Symbol Name
Address
7
RS3A7
6
RS3A6 0
5
RS3A5 0
4
RS3A4 R 0
3
RS3A3 0
2
RS3A2 0
1
RS3A1 0 RS3A9 R 0
0
RS3A0 0 RS3A8 0
08DCH 0 NANDF read solomon Result address Register3 08DDH
NAND Flash Reed-Solomon Calculation Result Address Register (7-0)
NDRSCA3
NAND Flash ReedSolomon Calculation Result Address Register (9-8)
NANDF read NDRSCD3 solomon Result data Register3 08DEH
RS2D7 0
RS2D6 0
RS2D5 0
RS2D4 R 0
RS2D3 0
RS2D2 0
RS2D1 0
RS2D0 0
NAND Flash Reed-Solomon Calculation Result Data Register (7-0) D7 1FF0H D6 D5 D4 R/W Undefined Undefined Undefined Undefined Undefined Undefined Undefined Undefined NAND-Flash Data Register (7-0) D15 1FF1H D14 D13 D12 R/W Undefined Undefined Undefined Undefined Undefined Undefined Undefined Undefined NAND-Flash Data Register (15-8) D7 1FF2H D6 D5 D4 R/W Undefined Undefined Undefined Undefined Undefined Undefined Undefined Undefined NAND-Flash Data Register (7-0) D15 1FF3H D14 D13 D12 R/W Undefined Undefined Undefined Undefined Undefined Undefined Undefined Undefined NAND-Flash Data Register (15-8) D11 D10 D9 D8 D3 D2 D1 D0 D11 D10 D9 D8 D3 D2 D1 D0
NDFDTR0
NANDF Data Register0
NANDF NDFDTR1 Data Register1
92CF26A-740
2007-11-21
TMP92CF26A
(12) DMAC (1/7) Symbol Name
Address
7
D0SA7
6
D0SA6 0 D0SA14 0 D0SA22 0 D0DA6 0 D0DA14 0 D0DA22 0 D0CA6 0 D0CA14 0 D0CB6 0 D0CB14 0
5
D0SA5 0 D0SA13 0 D0SA21 0 D0DA5 0 D0DA13 0 D0DA21 0 D0CA5 0 D0CA13 0 D0CB5 0 D0CB13 0
4
D0SA4 R/W 0 D0SA12 0 D0SA20 0 D0DA4 R/W 0 D0DA12 0 D0DA20 0 D0CA4 R/W 0 D0CA12 0 D0CB4 R/W 0 D0CB12 0 D0M4 0
3
D0SA3 0 D0SA11 0 D0SA19 0 D0DA3 0 D0DA11 0 D0DA19 0 D0CA3 0 D0CA11 0 D0CB3 0 D0CB11 0 D0M3 0
2
D0SA2 0 D0SA10 0 D0SA18 0 D0DA2 0 D0DA10 0 D0DA18 0 D0CA2 0 D0CA10 0 D0CB2 0 D0CB10 0 D0M2 R/W 0
1
D0SA1 0 D0SA9 0 D0SA17 0 D0DA1 0 D0DA9 0 D0DA17 0 D0CA1 0 D0CA9 0 D0CB1 0 D0CB9 0 D0M1 0
Transfer data size 00: 1 byte 01: 2 bytes 10: 4 bytes 11: Reserved
0
D0SA0 0 D0SA8 0 D0SA16 0 D0DA0 0 D0DA8 0 D0DA16 0 D0CA0 0 D0CA8 0 D0CB0 0 D0CB8 0 D0M0 0
0900H 0 D0SA15 0901H 0 D0SA23 0902H 0 D0DA7 0904H 0 DMA destination address Register0 D0DA23 0906H 0 D0CA7 DMA Transfer HDMACA0 count number A Register0 0909H 0 D0CB7 DMA Transfer HDMACB0 count number B Register0 090BH 0 D0CB15 090AH 0 D0CA15 0908H 0 D0DA15 0905H 0
Source address for DMA0 (7:0) DMA source address Register0 R/W Source address for DMA0 (15:8) R/W Source address for DMA0 (23:16)
HDMAS0
Destination address for DMA0 (7:0) R/W Destination address for DMA0 (15:8) R/W Destination address for DMA0 (23:16)
HDMAD0
Transfer count A for DMA0 (7:0) R/W Transfer count A for DMA0 (15:8)
Transfer count B for DMA0 (7:0) R/W Transfer count B for DMA0 (15:8)
HDMAM0
DMA transfer Mode Register0
090CH
DMA transfer mode 000: Destination INC (I/O MEM) 001: Destination DEC (I/O MEM) 010: Source INC (MEM I/O) 011: Source DEC (MEM I/O) 100: Source/destination INC (MEM MEM) 101: Source/destination DEC (MEM MEM) 110: Source/destination fixed (I/O I/O) 111: Reserved
92CF26A-741
2007-11-21
TMP92CF26A
(12) DMAC (2/7) Symbol Name
Address
7
D1SA7
6
D1SA6 0 D1SA14 0 D1SA22 0 D1DA6 0 D1DA14 0 D1DA22 0 D1CA6 0 D1CA14 0 D1CB6 0 D0CB14 0
5
D1SA5 0 D1SA13 0 D1SA21 0 D1DA5 0 D1DA13 0 D1DA21 0 D1CA5 0 D1CA13 0 D1CB5 0 D0CB13 0
4
D1SA4 R/W 0 D1SA12 0 D1SA20 0 D1DA4 R/W 0 D1DA12 0 D1DA20 0 D1CA4 R/W 0 D1CA12 0 D1CB4 R/W 0 D0CB12 0 D1M4 0
3
D1SA3 0 D1SA11 0 D1SA19 0 D1DA3 0 D1DA11 0 D1DA19 0 D1CA3 0 D1CA11 0 D1CB3 0 D0CB11 0 D1M3 0
2
D1SA2 0 D1SA10 0 D1SA18 0 D1DA2 0 D1DA10 0 D1DA18 0 D1CA2 0 D1CA10 0 D1CB2 0 D0CB10 0 D1M2 R/W 0
1
D1SA1 0 D1SA9 0 D1SA17 0 D1DA1 0 D1DA9 0 D1DA17 0 D1CA1 0 D1CA9 0 D1CB1 0 D0CB9 0 D1M1 0
Transfer data size 00: 1 byte 01: 2 bytes 10: 4 bytes 11: Reserved
0
D1SA0 0 D1SA8 0 D1SA16 0 D1DA0 0 D1DA8 0 D1DA16 0 D1CA0 0 D1CA8 0 D1CB0 0 D0CB8 0 D1M0 0
0910H 0 D1SA15 0911H 0 D1SA23 0912H 0 D1DA7 0914H 0 DMA destination address Register1 D1DA23 0916H 0 D1CA7 DMA Transfer HDMACA1 count number A Register1 0919H 0 D1CB7 DMA Transfer HDMACB1 count number B Register1 091BH 0 D0CB15 091AH 0 D1CA15 0918H 0 D1DA15 0915H 0
Set source address for DMA1 (7:0) DMA source address Register1 R/W Set source address for DMA1 (15:8) R/W Set source address for DMA1 (23:16)
HDMAS1
Set destination address for DMA1 (7:0) R/W Set destination address for DMA1 (15:8) R/W Set destination address for DMA1 (23:16)
HDMAD1
Set transfer-count-number A for DMA1 (7:0) R/W Set transfer-count-number A for DMA1 (15:8)
Set transfer-count-number B for DMA1 (7:0) R/W Set transfer-count-number B for DMA1 (15:8)
HDMAM1
DMA transfer Mode Register1
091CH
DMA transfer mode 000: Destination INC (I/O MEM) 001: Destination DEC (I/O MEM) 010: Source INC (MEM I/O) 011: Source DEC (MEM I/O) 100: Source/destination INC (MEM MEM) 101: Source/destination DEC (MEM MEM) 110: Source/destination fixed (I/O I/O) 111: Reserved
92CF26A-742
2007-11-21
TMP92CF26A
(12) DMAC (3/7) Symbol Name
Address
7
D2SA7
6
D2SA6 0 D2SA14 0 D2SA22 0 D2DA6 0 D2DA14 0 D2DA22 0 D2CA6 0 D2CA14 0 D2CB6 0 D2CB14 0
5
D2SA5 0 D2SA13 0 D2SA21 0 D2DA5 0 D2DA13 0 D2DA21 0 D2CA5 0 D2CA13 0 D2CB5 0 D2CB13 0
4
D2SA4 R/W 0 D2SA12 0 D2SA20 0 D2DA4 R/W 0 D2DA12 0 D2DA20 0 D2CA4 R/W 0 D2CA12 0 D2CB4 R/W 0 D2CB12 0 D2M4 0
3
D2SA3 0 D2SA11 0 D2SA19 0 D2DA3 0 D2DA11 0 D2DA19 0 D2CA3 0 D2CA11 0 D2CB3 0 D2CB11 0 D2M3 0
2
D2SA2 0 D2SA10 0 D2SA18 0 D2DA2 0 D2DA10 0 D2DA18 0 D2CA2 0 D2CA10 0 D2CB2 0 D2CB10 0 D2M2 R/W 0
1
D2SA1 0 D2SA9 0 D2SA17 0 D2DA1 0 D2DA9 0 D2DA17 0 D2CA1 0 D2CA9 0 D2CB1 0 D2CB9 0 D2M1 0
Transfer data size 00: 1 byte 01: 2 bytes 10: 4 bytes 11: Reserved
0
D2SA0 0 D2SA8 0 D2SA16 0 D2DA0 0 D2DA8 0 D2DA16 0 D2CA0 0 D2CA8 0 D2CB0 0 D2CB8 0 D2M0 0
0920H 0 D2SA15 0921H 0 D2SA23 0922H 0 D2DA7 0924H 0 DMA destination address Register2 D2DA23 0926H 0 D2CA7 DMA Transfer HDMACA2 count number A Register2 0929H 0 D2CB7 DMA Transfer HDMACB2 count number B Register2 092BH 0 D2CB15 092AH 0 D2CA15 0928H 0 D2DA15 0925H 0
Source address for DMA2 (7:0) DMA source address Register2 R/W Source address for DMA2 (15:8) R/W Source address for DMA2 (23:16)
HDMAS2
Destination address for DMA2 (7:0) R/W Destination address for DMA2 (15:8) R/W Destination address for DMA2 (23:16)
HDMAD2
Transfer count A for DMA2 (7:0) R/W Transfer count A for DMA2 (15:8)
Transfer count B for DMA2 (7:0) R/W Transfer count B for DMA2 (15:8)
HDMAM2
DMA transfer Mode Register2
092CH
DMA transfer mode 000: Destination INC (I/O MEM) 001: Destination DEC (I/O MEM) 010: Source INC (MEM I/O) 011: Source DEC (MEM I/O) 100: Source/destination INC (MEM MEM) 101: Source/destination DEC (MEM MEM) 110: Source/destination fixed (I/O I/O) 111: Reserved
92CF26A-743
2007-11-21
TMP92CF26A
(12) DMAC (4/7) Symbol Name
Address
7
D3SA7
6
D3SA6 0 D3SA14 0 D3SA22 0 D3DA6 0 D3DA14 0 D3DA22 0 D3CA6 0 D3CA14 0 D3CB6 0 D3CB14 0
5
D3SA5 0 D3SA13 0 D3SA21 0 D3DA5 0 D3DA13 0 D3DA21 0 D3CA5 0 D3CA13 0 D3CB5 0 D3CB13 0
4
D3SA4 R/W 0 D3SA12 0 D3SA20 0 D3DA4 R/W 0 D3DA12 0 D3DA20 0 D3CA4 R/W 0 D3CA12 0 D3CB4 R/W 0 D3CB12 0 D3M4 0
3
D3SA3 0 D3SA11 0 D3SA19 0 D3DA3 0 D3DA11 0 D3DA19 0 D3CA3 0 D3CA11 0 D3CB3 0 D3CB11 0 D3M3 0
2
D3SA2 0 D3SA10 0 D3SA18 0 D3DA2 0 D3DA10 0 D3DA18 0 D3CA2 0 D3CA10 0 D3CB2 0 D3CB10 0 D3M2 R/W 0
1
D3SA1 0 D3SA9 0 D3SA17 0 D3DA1 0 D3DA9 0 D3DA17 0 D3CA1 0 D3CA9 0 D3CB1 0 D3CB9 0 D3M1 0
Transfer data size 00: 1 byte 01: 2 bytes 10: 4 bytes 11: Reserved
0
D3SA0 0 D3SA8 0 D3SA16 0 D3DA0 0 D3DA8 0 D3DA16 0 D3CA0 0 D3CA8 0 D3CB0 0 D3CB8 0 D3M0 0
0930H 0 D3SA15 0931H 0 D3SA23 0932H 0 D3DA7 0934H 0 DMA destination address Register3 D3DA23 0936H 0 D3CA7 DMA Transfer HDMACA3 count number A Register3 0939H 0 D3CB7 DMA Transfer HDMACB3 count number B Register3 093BH 0 D3CB15 093AH 0 D3CA15 0938H 0 D3DA15 0935H 0
Set source address for DMA3 (7:0) DMA source address Register3 R/W Set source address for DMA3 (15:8) R/W Set source address for DMA3 (23:16)
HDMAS3
Set destination address for DMA3 (7:0) R/W Set destination address for DMA3 (15:8) R/W Set destination address for DMA3 (23:16)
HDMAD3
Transfer count A for DMA3 (7:0) R/W Transfer count A for DMA3 (15:8)
Transfer count B for DMA3 (7:0) R/W Transfer count B for DMA3 (15:8)
HDMAM3
DMA transfer Mode Register3
093CH
DMA transfer mode 000: Destination INC (I/O MEM) 001: Destination DEC (I/O MEM) 010: Source INC (MEM I/O) 011: Source DEC (MEM I/O) 100: Source/destination INC (MEM MEM) 101: Source/destination DEC (MEM MEM) 110: Source/destination fixed (I/O I/O) 111: Reserved
92CF26A-744
2007-11-21
TMP92CF26A
(12) DMAC (5/7) Symbol Name
Address
7
D4SA7
6
D4SA6 0 D4SA14 0 D4SA22 0 D4DA6 0 D4DA14 0 D4DA22 0 D4CA6 0 D4CA14 0 D4CB6 0 D4CB14 0
5
D4SA5 0 D4SA13 0 D4SA21 0 D4DA5 0 D4DA13 0 D4DA21 0 D4CA5 0 D4CA13 0 D4CB5 0 D4CB13 0
4
D4SA4 R/W 0 D4SA12 0 D4SA20 0 D4DA4 R/W 0 D4DA12 0 D4DA20 0 D4CA4 R/W 0 D4CA12 0 D4CB4 R/W 0 D4CB12 0 D4M4 0
3
D4SA3 0 D4SA11 0 D4SA19 0 D4DA3 0 D4DA11 0 D4DA19 0 D4CA3 0 D4CA11 0 D4CB3 0 D4CB11 0 D4M3 0
2
D4SA2 0 D4SA10 0 D4SA18 0 D4DA2 0 D4DA10 0 D4DA18 0 D4CA2 0 D4CA10 0 D4CB2 0 D4CB10 0 D4M2 R/W 0
1
D4SA1 0 D4SA9 0 D4SA17 0 D4DA1 0 D4DA9 0 D4DA17 0 D4CA1 0 D4CA9 0 D4CB1 0 D4CB9 0 D4M1 0
Transfer data size 00: 1 byte 01: 2 bytes 10: 4 bytes 11: Reserved
0
D4SA0 0 D4SA8 0 D4SA16 0 D4DA0 0 D4DA8 0 D4DA16 0 D4CA0 0 D4CA8 0 D4CB0 0 D4CB8 0 D4M0 0
0940H 0 D4SA15 0941H 0 D4SA23 0942H 0 D4DA7 0944H 0 DMA destination address Register4 D4DA23 0946H 0 D4CA7 DMA Transfer HDMACA4 count number A Register4 0949H 0 D4CB7 DMA Transfer HDMACB4 count number B Register4 094BH 0 D4CB15 094AH 0 D4CA15 0948H 0 D4DA15 0945H 0
Source address for DMA4 (7:0) DMA source address Register4 R/W Source address for DMA4 (15:8) R/W Source address for DMA4 (23:16)
HDMAS4
Destination address for DMA4 (7:0) R/W Destination address for DMA4 (15:8) R/W Destination address for DMA4 (23:16)
HDMAD4
Transfer count A for DMA4 (7:0) R/W Transfer count A for DMA4 (15:8)
Transfer count B for DMA4 (7:0) R/W Transfer count B for DMA4 (15:8)
HDMAM4
DMA transfer Mode Register4
094CH
DMA transfer mode 000: Destination INC (I/O MEM) 001: Destination DEC (I/O MEM) 010: Source INC (MEM I/O) 011: Source DEC (MEM I/O) 100: Source/destination INC (MEM MEM) 101: Source/destination DEC (MEM MEM) 110: Source/destination fixed (I/O I/O) 111: Reserved
92CF26A-745
2007-11-21
TMP92CF26A
(12) DMAC (6/7) Symbol Name
Address
7
D5SA7
6
D5SA6 0 D5SA14 0 D5SA22 0 D5DA6 0 D5DA14 0 D5DA22 0 D5CA6 0 D5CA14 0 D5CB6 0 D5CB14 0
5
D5SA5 0 D5SA13 0 D5SA21 0 D5DA5 0 D5DA13 0 D5DA21 0 D5CA5 0 D5CA13 0 D5CB5 0 D5CB13 0
4
D5SA4 R/W 0 D5SA12 0 D5SA20 0 D5DA4 R/W 0 D5DA12 0 D5DA20 0 D5CA4 R/W 0 D5CA12 0 D5CB4 R/W 0 D5CB12 0 D5M4 0
3
D5SA3 0 D5SA11 0 D5SA19 0 D5DA3 0 D5DA11 0 D5DA19 0 D5CA3 0 D5CA11 0 D5CB3 0 D5CB11 0 D5M3 0
2
D5SA2 0 D5SA10 0 D5SA18 0 D5DA2 0 D5DA10 0 D5DA18 0 D5CA2 0 D5CA10 0 D5CB2 0 D5CB10 0 D5M2 R/W 0
1
D5SA1 0 D5SA9 0 D5SA17 0 D5DA1 0 D5DA9 0 D5DA17 0 D54CA1 0 D5CA9 0 D5CB1 0 D5CB9 0 D5M1 0
Transfer data size 00: 1 byte 01: 2 bytes 10: 4 bytes 11: Reserved
0
D5SA0 0 D5SA8 0 D5SA16 0 D5DA0 0 D5DA8 0 D5DA16 0 D5CA0 0 D5CA8 0 D5CB0 0 D5CB8 0 D5M0 0
0950H 0 D5SA15 0951H 0 D5SA23 0952H 0 D5DA7 0954H 0 DMA destination address Register5 D5DA23 0956H 0 D5CA7 DMA Transfer HDMACA5 count number A Register5 0959H 0 D5CB7 DMA Transfer HDMACB5 count number B Register5 095BH 0 D5CB15 095AH 0 D5CA15 0958H 0 D5DA15 0955H 0
Source address for DMA5 (7:0) DMA source address Register5 R/W Source address for DMA5 (15:8) R/W Source address for DMA5 (23:16)
HDMAS5
Destination address for DMA5 (7:0) R/W Destination address for DMA5 (15:8) R/W Destination address for DMA5 (23:16)
HDMAD5
Transfer count A for DMA5 (7:0) R/W Transfer count A for DMA5 (15:8)
Transfer count B for DMA5 (7:0) R/W Transfer count B for DMA5 (15:8)
HDMAM5
DMA transfer Mode Register5
095CH
DMA transfer mode 000: Destination INC (I/O MEM) 001: Destination DEC (I/O MEM) 010: Source INC (MEM I/O) 011: Source DEC (MEM I/O) 100: Source/destination INC (MEM MEM) 101: Source/destination DEC (MEM MEM) 110: Source/destination fixed (I/O I/O) 111: Reserved
92CF26A-746
2007-11-21
TMP92CF26A
(12) DMAC (7/7) Symbol Name
DMA enable Register
Address
7
6
5
DMAE5
4
DMAE4 0
3
DMAE3 0 0: Disable R/W
2
DMAE2 0 1: Enable DMATR2
1
DMAE1 0
0
DMAE0 0
HDMAE
097EH
0
DMA channel operation DMATE DMATR6 0 DMATR5 0 DMATR4 DMATR3 DMATR1 0 DMATR0 0
R/W DMA HDMATR timer Register 0 097FH Timer operation 0: Disable 1: Enable 0 0 0 Maximum bus occupancy time setting "Maximum bus occupancy time / (256/fSYS)". "00H" cannot be set.
The value to be set in should be obtained by
92CF26A-747
2007-11-21
TMP92CF26A
(13) Clock gear, PLL Symbol Name
Address
7
6
XTEN
5
R/W
4
3
2
WUEF R/W 0
Warm-up timer
1
0
PRCK R/W 0
Select Prescaler clock 0: fSYS/2 1: fSYS/8
USBCLK1 USBCLK0 0
Select the clock of USB(fUSB) 00: Disable 01: Reserved 10: X1USB 11: fPLLUSB
SYSCR0
System clock control register0
1 10E0H
Low -frequency oscillator circuit (fs) 0: Stop 1: Oscillation
0
GEAR2 System clock control register1 1 10E1H
GEAR1 R/W 0
GEAR0 0
SYSCR1
Select gear value of high frequency (fc) 000: fc 101: (Reserved) 001: fc/2 110: (Reserved) 010: fc/4 111: (Reserved) 011: fc/8 100: fc/16
-
CKOSEL
WUPTM1 WUPTM0 R/W 1 0
HALTM1 1
HALTM0 1
SYSCR2
System clock control register2
0 0 10E2H Always write Select
"0". CLKOUT 0: fSYS 1: fs
Warm-Up Timer 00: Reserved 01: 28/inputted frequency 10:214/inputted frequency 11:216/inputted frequency
HALT mode 00: Reserved 01: STOP mode 10: IDLE1 mode 11: IDLE2 mode
EMC EMCCR0 control register0
PROTECT R 0 10E3H Protect flag
0: OFF 1: ON
- R/W 0
EXTIN R/W 0
DRVOSCH DRVOSCL R/W R/W 1 1
fc oscillator drive ability 1: NORMAL 0: WEAK fs oscillator drive ability 1: NORMAL 0: WEAK
Always write 1: External "0". clock
EMC EMCCR1 control register1 EMC EMCCR2 control register2
10E4H
Switching the protect ON/OFF by write to following 1 -KEY,2 -KEY 1 -KEY: EMCCR1=5AH,EMCCR2=A5H in succession write nd 2 -KEY: EMCCR1=A5H,EMCCR2=5AH in succession write
st
st
nd
10E5H
PLLCR0
PLL control register0
FCSEL R/W 0 10E8H
Select fc clock 0 : fOSCH 1 : fPLL
LUPFG R 0
Lock-up timer Status flag 0 : not end 1 : end
PLL0 0 PLLCR1 PLL control register1 10E9H
PLL0 for CPU 0: Off 1: On
PLL1 R/W 0
PLL1 for USB 0: Off 1: On
LUPSEL 0
Select stage of Lock up counter 0: 12 stage (for PLL0) 1:13 stage (for PLL1)
PLLTIMES R/W 0
Select the number of PLL 0: x12 1: x16
92CF26A-748
2007-11-21
TMP92CF26A
(14) 8-bit timer (1/2) Symbol Name
Address
7
TA0RDE R/W 0
6
5
4
3
I2TA01 0 IDLE2 0: Stop
2
1
0
TA0RUN 0 (UC0)
TMRA01 TA01RUN RUN register
TA01PRUN TA1RUN R/W 0 0 TMRA01 prescaler (UC1)
1100H
Double buffer 0: Disable 1: Enable
Up counter Up counter
1: Operate 0: Stop and clear 1: Run (Count up)
- W 0 - W 0
TA0REG
8-bit timer register 0 8-bit timer register 1
1102H (Prohibit RMW) 1103H (Prohibit RMW) TA01M1 0 TA01M0 0 PWM01 0 PWM cycle 00: Reserved 01: 2
6 7 8
TA1REG
PWM00 TA1CLK1 TA1CLK0 R/W 0 0 0
Source clock for TMRA1
TA0CLK1 TA0CLK0 0 00: TA0IN pin 01: T1 10: T4 0
TMRA01 TA01MOD MODE register
1104H
Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode
Source clock for TMRA0
00: TA0TRG 01: T1 10: T16
10: 2 11: 2
TMRA1 Flip-Flop TA1FFCR control register
11: T256 11: T16 TA1FFC1 TA1FFC0 TA1FFIE TA1FFIS W R/W 1 1 0 0 00: Invert TA1FF 01: Set TA1FF 10: Clear TA1FF 11: Don't care TA1FF inversion TA1FF select control for inversion 0: Disable 0: TMRA0
1105H (Prohibit RMW)
TMRA23 TA23RUN RUN register
TA2RDE R/W 0 1108H Double buffer 0: Disable 1: Enable 110AH (Prohibit RMW) 110BH (Prohibit RMW) TA23M1 TA23M0 PWM21 0 PWM cycle 01: 2
6 7 8
I2TA23 0 IDLE2 0: Stop
1: Enable 1: TMRA1 TA23PRUN TA3RUN TA2RUN R/W 0 0 0 TMRA23 Up counter Up counter (UC2)
prescaler (UC3) 1: Operate 0: Stop and clear 1: Run (Count up)
- W 0 - W 0
TA2REG
8-bit timer register 2 8-bit timer register 3
TA3REG
TMRA23 TA23MOD MODE register
110CH
0 0 Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode
PWM20 TA3CLK1 TA3CLK0 R/W 0 0 0
Source clock for TMRA3
TA2CLK1 TA2CLK0 0 00: Reserved 01: T1 10: T4 11: T16 TA3FFIE TA3FFIS R/W 0 0 TA3FF inversion 1: Enable TA3FF select 1: TMRA3 control for inversion 0: Disable 0: TMRA2 0
Source clock for TMRA2
00: Reserved 10: 2 11: 2
00: TA2TRG 01: T1 10: T16 11: T256 TA3FFC1 TA3FFC0 W 1 1
TMRA3 Flip-Flop TA3FFCR control register
110DH (Prohibit RMW)
00: Invert TA3FF 01: Set TA3FF 10: Clear TA3FF 11: Don't care
92CF26A-749
2007-11-21
TMP92CF26A
(14) 8-bit timer (1/2) Symbol Name
Address
7
TA4RDE R/W 0
6
5
4
3
I2TA45 0 IDLE2 0: Stop
2
1
0
TA4RUN 0 (UC4)
TMRA45 TA45RUN RUN register
TA45PRUN TA5RUN R/W 0 0 TMRA45 prescaler (UC5)
1110H
Double buffer 0: Disable 1: Enable
Up counter Up counter
1: Operate 0: Stop and clear 1: Run (Count up)
- W 0 - W 0
TA4REG
8-bit timer register 4 8-bit timer register 5
1112H (Prohibit RMW) 1113H (Prohibit RMW) TA45M1 0 TA45M0 0 PWM41 0 PWM cycle 00: Reserved 01: 2 10: 2 11: 2
6 7 8
TA5REG
PWM40 TA5CLK1 TA5CLK0 R/W 0 0 0
Source clock for TMRA5
TA4CLK1 TA4CLK0 0 00: 32KHz clock 01: T1 10: T4 0
TMRA45 TA45MOD MODE register
1114H
Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode
Source clock for TMRA4
00: TA4TRG 01: T1 10: T16
TMRA5 Flip-Flop TA5FFCR control register
11: T256 11: T16 TA5FFC1 TA5FFC0 TA5FFIE TA5FFIS W R/W 1 1 0 0 00: Invert TA5FF 01: Set TA5FF 10: Clear TA5FF 11: Don't care TA5FF inversion TA5FF select control for inversion 0: Disable 0: TMRA4
1115H (Prohibit RMW)
TMRA67 TA67RUN RUN register
TA6RDE R/W 0 1118H Double buffer 0: Disable 1: Enable 111AH (Prohibit RMW) 111BH (Prohibit RMW) TA67M1 0 TA67M0 0 PWM61 0 PWM cycle 00: Reserved 01: 2 10: 2 11: 2
6 7 8
I2TA67 0 IDLE2 0: Stop
1: Enable 1: TMRA5 TA67PRUN TA7RUN TA6RUN R/W 0 0 0 TMRA67 prescaler Up counter Up counter (UC7) (UC6)
1: Operate 0: Stop and clear 1: Run (Count up)
- W 0 - W 0
TA6REG
8-bit timer register 2 8-bit timer register 3
TA7REG
PWM60 TA7CLK1 TA7CLK0 R/W 0 0 0
Source clock for TMRA7
TA6CLK1 TA6CLK0 0 00: 32KHz clock 01: T1 10: T4 0
TMRA67 TA67MOD MODE register
111CH
Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode
Source clock for TMRA6
00: TA6TRG 01: T1 10: T16
TMRA7 Flip-Flop TA7FFCR control register
11: T256 11: T16 TA7FFC1 TA7FFC0 TA7FFIE TA7FFIS W R/W 1 1 0 0 00: Invert TA7FF 01: Set TA7FF 10: Clear TA7FF 11: Don't care TA7FF inversion 1: Enable TA7FF select 1: TMRA7 control for inversion 0: Disable 0: TMRA6
111DH (Prohibit RMW)
92CF26A-750
2007-11-21
TMP92CF26A
(15) 16-bit timer (1/2) Symbol Name
Address
7
TB0RDE R/W 0
6
- R/W 0
5
4
3
I2TB0 R/W 0
IDLE2 0: Stop 1: Operate
2
TB0PRUN R/W 0 TMRB0 prescaler
1
0
TB0RUN R/W 0 Up counter (UC10)
TB0RUN
TMRB0 RUN register
1180H
Double buffer 0: disable 1: enable
-
Always write "0".
0: Stop and clear 1: Run (Count up) TB0CLE R/W 0 counter 0:Clear Disable 1:Clear Enable TB0CLK1 0 00: TB0IN0 input 01: T1 10: T4 11: T16 TB0CLK0 0
-
R/W 0 0 Always write "00".
TB0CP0I W* 1 Software capture control
TB0CPM1 TB0CPM0 0
Capture timing 00: Disable INT6 occurs at rising edge
0
Control Up TMRB1 source clock
TMRB0 TB0MOD MODE register
1182H (Prohibit RMW)
0: Execute 1:Undefined 01: TB0IN0 INT6 occurs at rising edge 10: TB0IN0 TB0IN0 INT6 occurs at falling edge 11: TA1OUT TA1OUT INT6 occurs at rising edge
-
-
TB0CT1 0
W* 1 TMRB0 Flip-Flop TB0FFCR control register 1183H (Prohibit RMW) 1 Always write "11".
TB0C0T1 TB0E1T1 R/W 0 0
TB0E0T1 TB0FF0C1 TB0FF0C0 W* 0 1 1 Control TB1FF0 00: Invert 01: Set
TB1FF0 inversion trigger 0: Disable trigger
*Always read as "11". 1: Enable trigger
When capture UC10 to TB0CP1H/L
When UC10 When UC10 10: Clear When matches with matches with 11: Don't care capture TB0RG1H/L TB0RG0H/L UC10 to * Always read as "11". TB0CP0H/L
16 bit timer TB0RG0L register 0 low 16 bit timer TB0RG0H register 0 high TB0RG1L 16 bit timer register low
1188H (Prohibit RMW) 1189H (Prohibit RMW) 118AH (Prohibit RMW) 118BH (Prohibit RMW) 118CH
16 bit timer TB0RG1H register 1 high Capture TB0CP0L register 0 low Capture TB0CP0H register 0 high Capture TB0CP1L register 1 low Capture TB0CP1H register 1 high
118DH
118EH
118FH
- W 0 - W 0 - W 0 - W 0 - R Undefined - R Undefined - R Undefined - R Undefined
92CF26A-751
2007-11-21
TMP92CF26A
(15) 16-bit timer (2/2) Symbol Name
Address
7
TB1RDE R/W
6
-
5
4
3
I2TB1 R/W 0
IDLE2 0: Stop 1: Operate
2
TB1PRUN R/W 0 TMRB0 prescaler
1
0
TB1RUN R/W 0 Up counter (UC12)
R/W 0 Always write "0".
TB1RUN
TMRB1 RUN register
0 1190H Double buffer 0: disable 1: enable
-
0: Stop and clear 1: Run (Count up) TB1CLE R/W 0 TB1CLK1 0 00: TB1IN0 input 01: T1 10: T4 11: T16 TB1CLK0 0
-
TB1CP0I TB1CPM1 TB1CPM0 W* 1 Software capture control 0
Capture timing
R/W 0 0 Always write "00".
0
Control Up TMRB1 source clock
TMRB1 TB1MOD MODE register
1192H (Prohibit RMW)
0: Execute Disable 1: Undefined 01: TB1IN0 1:Clear INT7 occurs at rising Enable edge 10: TB1IN0 TB1IN0 INT7 occurs at falling edge 11: TA3OUT TA3OUT INT7 occurs at rising edge
00: Disable counter INT7 occurs at rising 0:Clear edge
-
-
TB1CT1 0
TB1C0T1 TB1E1T1 TB1E0T1 TB1FF0C1 TB1FF0C0 R/W W* 0 0 1 Control TB1FF0 00: Invert 01: Set
When UC12 matches with TB1RG1H/L When UC12 10: Clear matches 11: Don't care with * Always read as "11". TB1RG0H/L
W* 1 TMRB1 Flip-Flop TB1FFCR control register 1193H (Prohibit RMW) 1 0 Always write "11".
*Always read as "11".
1
TB1FF0 inversion trigger 0: Disable trigger 1: Enable trigger
When capture UC12 to TB1CP1H/L When capture UC12 to TB0CP0H/L
16 bit timer TB1RG0L register 0 low 16 bit timer TB1RG0H register 0 high TB1RG1L 16 bit timer register low
1198H (Prohibit RMW) 1199H (Prohibit RMW) 119AH (Prohibit RMW) 119BH (Prohibit RMW) 119CH
16 bit timer TB1RG1H register 1 high Capture TB1CP0L register 0 low Capture TB1CP0H register 0 high Capture TB1CP1L register 1 low Capture TB1CP1H register 1 high
119DH
119EH
119FH
- W 0 - W 0 - W 0 - W 0 - R Undefined - R Undefined - R Undefined - R Undefined
92CF26A-752
2007-11-21
TMP92CF26A
(16) UART/Serial channels Symbol
SC0BUF
Name
Serial channel 0 buffer register
Address
1200H (Prohibit RMW)
7
RB7 TB7
6
RB6 TB6
5
RB5 TB5
4
RB4 TB4
3
RB3 TB3
2
RB2 TB2
1
RB1 TB1
0
RB0 TB0
R (Receive) /W (Transmission) Undefined RB8 EVEN R/W 0 Parity addition 0: Disable 1: Enable TB8 0 Transfer CTSE 0 0: CTS disable 1: CTS enable RXE 0 Receive function disable 1:Receive enable
-
PE
OERR 0 Overrun
PERR 0 1: Error Parity
FERR 0 Framing
SCLKS R/W 0 1: SCLK0
IOC 0 generator 1: SCLK0 pin input
SC0CR
Serial channel 0 control register
R 1201H Undefined 0 (Prohibit Received Parity RMW) data bit8 0: Odd 1: Even
R (Cleared to 0 when read)
0: SCLK0 0:baud rate
WU R/W 0 Wake up
SM1 0
SM0 0
SC1 0
SC0 0
Serial channel 0 SC0MOD0 mode 0 register
00: I/O interface Mode 00: TA0TRG 01: Baud rate generator 10: Internal clock 1 11: External clock (SCLK0 input) 10: 8-bit UART Mode 11: 9-bit UART Mode
1202H
data bit 8
0: Disable 01: 7-bit UART Mode
0:Receive 1: Enable
BR0ADDE 0 division 1: Enable
BR0CK1 0 01: T2 11: T32
BR0CK0 0
BR0S3 R/W 0
BR0S2 0 0~F
BR0S1 0
BR0S0 0
BR0CR
Serial channel 0 baud rate control register
0 1203H Always write "0".
(16-K) /16 00: T0 0: Disable 10: T8 BR0K3
Divided frequency "N" setting
BR0ADD
Serial channel 0 K setting register
BR0K2 0
BR0K1 R/W 0
BR0K0 0
1204H 0 I2S0 FDPX0 R/W 0 Duplex 0: Half 1: Full RXSEL 0 Receive data 1: "L" pulse TXEN 0 Transmit RXEN 0 Receive 1: Enable SIRWD3 R/W 0 0 0
Sets frequency divisor "K" (1~F) R/W 1205H 0 IDLE2 0: Stop 1: Run PLSEL
Serial channel 0 SC0MOD1 mode 1 register
SIRWD2
SIRWD1 0
SIRWD0 0
SIRCR
IrDA control register
Select 1207H transmit pulse width 0: 3/16 1: 1/16
Select receive pulse width more than 2x x (setting value + 1) + 100ns Can be set: 1~14 Can not be set: 0, 15
0: Disable 0: Disable Set the valid SIRRxD pulse width for equal or
0:"H" pulse 1: Enable
92CF26A-753
2007-11-21
TMP92CF26A
(17) SBI Symbol Name Address 7
BC2
6
BC1 R/W
5
BC0
4
ACK R/W
3
-
2
SCK2 R/W 0
1
SCK1
0
SCK0 /SWRMON R/W 0/1
R 1
SBICR1
Serial bus interface control register 1
1240H
0
0
0
0
0
(Prohibit Number of transfer bits RMW) 000: 8 001: 1 010: 2 011: 3 110: 6 100: 4 111: 7 DB6 DB5 101: 5
Acknowledge Always Setting for the divisor value "n" mode read as "1". (When writing) specification
0: Disable 1: Enable DB4 DB3 Undefined
000: 4 011: 7
001: 5 100:8
010: 6
101: 9 DB0
110: 10 DB2
111: (Reserved) DB1
SBI SBIDBR buffer register
1241H (Prohibit RMW)
DB7
R (receive)/W (Transmit) SA6 SA5 0 SA4 0 SA3 R/W 0 SA2 0 SA1 0 SA0 0 ALS 0 Address Slave Address setting recognition 0: Enable AD0/ SWRST1 R/W 0 General call detection monitor 0: Undetected Last receive bit monitor 0: "0" 1: "1" 1: Disable LRB/ SWRST0 R/W 0
I C BUS I2CAR Address register
2
1242H (Prohibit RMW)
0
MST R/W 0 SBISR When read Serial bus interface status register Master/ Slave status monitor 0:Slave 1243H (Prohibit RMW) 1:Master
TRX R/W 0
Transmitter/ Receiver status monitor 0:Receiver 1:Transmitter
2
BB R/W 0 I C bus status monitor 0: Free 1: Busy
PIN R/W 1 INTSBI request monitor 1: Cancel
AL/SBIM1 AAS/SBIM0 R/W 0 Arbitration lost detection 0: - R/W 0 Slave Address match detection monitor
0: Request monitor
1: Detected 0: 1: Detected Start/Stop Cancel condition INTSBI interrupt request 0:Don't care 1:Cancel interrupt request Serial bus interface operation mode selection 00: Port mode 01: (Reserved) 10: I C bus mode 11: (Reserved)
2
Undetected 1: Detected Software reset generate write "10" and "01", then an internal reset signal is generated.
SBICR2 When write
Serial bus interface control register 2
0: Stop condition 1: Busy condition
-
I2SBI R/W 0 IDLE2 0: Stop 1: Operate
-
0
-
-
-
-
-
-
SBIBR0
Serial bus interface baud rate register 0
1244H
W 0
R 1 1 1 Always read as "1". 1 1
R/W 0 Always write "0".
(Prohibit RMW) Always read "0" SBIEN
-
-
-
-
-
-
SBICR0
Serial bus interface control register 0
R/W 1247H 0 0 0 (Prohibit SBI RMW) operation 0:disable 1:enable
R 0 Always read as "0". 0 0 0
92CF26A-754
2007-11-21
TMP92CF26A
(18) AD converter (1/3) Symbol Name
Address
7
ADR01 R
6
ADR00 0
5
4
3
2
1
OVR0 R 0
0
ADR0RF R 0
AD Conversion ADREG0L Result register 0 low
12A0H
0
Store Lower 2 bits of AN0 AD conversion result
Overrun flag AD conversion 0:No generate result store flag 1: Generate 1:Stored
AD conversion ADREG0H 12A1H result register 0 high AD conversion ADREG1L result register 1 low
ADR09 0 ADR11 R
ADR08 0 ADR10 0
ADR07
ADR06 R
ADR05
ADR04
ADR03 0 OVR1 R 0
ADR02 0 ADR1RF R 0
0 0 0 0 Store Upper 8 bits of an AN0 conversion result
12A2H
0
Store Lower 2 bits of AN1 AD conversion result
Overrun flag AD conversion 0:No generate result store flag 1: Generate 1:Stored
AD conversion ADREG1H 12A3H result register 1 high AD conversion ADREG2L result register 2 low
ADR19 0 ADR21 R
ADR18 0 ADR20 0
ADR17
ADR16 R
ADR15
ADR14
ADR13 0 OVR2 R 0
ADR12 0 ADR2RF R 0
0 0 0 0 Store Upper 8 bits of an AN1 conversion result
12A4H
0
Store Lower 2 bits of AN2 AD conversion result
Overrun flag AD conversion 0:No generate result store flag 1: Generate 1:Stored
AD conversion ADREG2H 12A5H result register 2 high AD conversion ADREG3L result register 3 low
ADR29 0 ADR31 R
ADR28 0 ADR30 0
ADR27
ADR26 R
ADR25
ADR24
ADR23 0 OVR3 R 0
ADR22 0 ADR3RF R 0
0 0 0 0 Store Upper 8 bits of an AN2 conversion result
12A6H
0
Store Lower 2 bits of AN3 AD conversion result
Overrun flag AD conversion 0:No generate result store flag 1: Generate 1:Stored
AD conversion ADREG3H 12A7H result register 3 high AD conversion ADREG4L result register 4 low
ADR39 0 ADR4 R
ADR38 0 ADR4 0
ADR37
ADR36 R
ADR35
ADR34
ADR33 0 OVR4 R 0
Overrun flag 0:No generate 1: Generate
ADR32 0 ADR4F R 0
AD conversion result store flag 1:Stored
0 0 0 0 Store Upper 8 bits of an AN3 conversion result
12A8H
0
Store Lower 2 bits of AN4 AD conversion result
AD conversion ADREG4H 12A9H result register 4high AD conversion ADREG5L result register 5 low
ADR49 0 ADR5 R
ADR48 0 ADR5 0
ADR47
ADR46 R
ADR45
ADR44
ADR43 0 OVR5 R 0
Overrun flag 0:No generate 1: Generate
ADR42 0 ADR5F R 0
AD conversion result store flag 1: Stored
0 0 0 0 Store Upper 8 bits of an AN4 conversion result
12AAH
0
Store Lower 2 bits of AN5 AD conversion result
AD conversion ADREG5H 12ABH result register 5 high
ADR59 0
ADR58 0
ADR57
ADR56 R
ADR55
ADR54
ADR53 0
ADR52 0
0 0 0 0 Store Upper 8 bits of an AN5 conversion result
92CF26A-755
2007-11-21
TMP92CF26A
(18) AD converter (2/3) Symbol Name
High priority
ADREGSPL
Address
7
ADRSP1 R
6
ADRSP0 0
5
4
3
2
1
OVSRP R 0
Overrun 1: Generate
0
ADRSPRF R 0
AD conversion result store flag 1:Stored
Conversion Register SP low High priority
12B0H
0
Store Lower 2 bits of an AD conversion result ADRSP9 12B1H 0 ADR21 R/W 0 12B4H 0 Store Lower 2 bits of an AD conversion result compare criterion ADR29 0 12B5H ADR28 0 ADR27 0 ADR26 R/W 0 0 0 ADR25 ADR24 0 ADR20 0 0 ADRSP8 ADRSP7 ADRSP6 R 0 0 ADRSP5 ADRSP4
ADRSP3 0
ADRSP2 0
ADREGSPH
Conversion Register SP high AD Conversion Result
Store Upper 8 bits of an AD conversion result
ADCM0REGL Compare
Criterion Register 0 Low AD Conversion Result
ADCM0REGH Compare
ADR23 0
ADR22 0
Criterion Register 0 High AD Conversion Result
ADCM1REGL Compare
Store Upper 8 bits of an AD conversion result compare criterion
ADR21 R/W 0 12B6H
ADR20 0
Store Lower 2 bits of an AD conversion result compare criterion ADR29 0 ADR28 0 ADR27 0 ADR26 R/W 0 0 0 0 0 ADR25 ADR24 ADR23 ADR22
Criterion Register 1 Low AD Conversion Result
ADCM1REGH Compare
12B7H Store Upper 8 bits of an AD conversion result compare criterion
Criterion Register 1 High
-
ADCLK2 R/W 0
ADCLK1 R/W 0
ADCLK0 R/W 0
AD Conversion ADCCLK Clock Setting Register 12BFH
R/W 0 Always write "0"
Select clock for AD conversion 000 : Reserved 100 : fIO/4 001 : fIO/1 010 : fIO/2 011 : fIO/3 101 : fIO/5 110 : fIO/6 111 : fIO/7
92CF26A-756
2007-11-21
TMP92CF26A
(18) AD converter (3/3) Symbol Name
Address
7
EOS R 0
Normal AD conversion end flag 0:During conversion sequence or before starting 1:Complete conversion sequence
6
BUSY 0
Normal AD conversion BUSY Flag 0:Stop conversion 1:During conversion
5
4
I2AD 0
AD conversion when IDLE2 mode 0: Stop 1: Operate
3
ADS 0
2
HTRGE R/W 0
1
TSEL1 0
0
TSEL0 0
ADMOD0
AD mode control register 0
12B8H
Start Normal Normal AD AD conversion conversion at Hard ware 0: Don't Care trigger 1:Start AD 0: Disable conversion 1: Enable Always read as"0".
Select Hard ware trigger 00: INTTB00 interrupt 01: Reserved 10: ADTRG 11: Reserved
DACON 0 AD mode control register 1
DAC and VREF application control
ADCH2 0
ADCH1 0
ADCH0 R/W 0
LAT 0
Latency 0: No Wait 1:Start after reading conversion result store Register of last channel
ITM 0
REPEAT 0
SCAN 0
Scan mode specification 0: Channel fixed mode 1: Channel scan mode
Analog input channel select
ADMOD1
12B9H
Interrupt Repeat specification mode when specification conversion 0:Single channel fixed conversion repeat mode 1:Repeat conversion
HEOS R 0
High-priority AD conversion sequence FLAG 0: During conversion sequence or before starting 1: Complete conversion sequence
HBUSY 0
High-priority AD conversion BUSY Flag 0:Stop conversion 1:During conversion
HADS 0
HHTRGE HTSEL1 R/W 0 0
HTSEL0 0
ADMOD2
AD mode control register 2
12BAH
Start High-priority High-priority AD AD conversion conversion at Hard ware 0: Don't Care trigger 1: Start AD 0: Disable conversion 1: Enable Always read as"0".
Select Hard ware trigger 00: INTTB10 interrupt 01: Reserved 10: ADTRG 11: I2S Sampling Counter Output
-
ADMOD3
AD mode control register 3
12BBH
0
HADCH2 HADCH1 R/W 0 0
HADCH0 0
- R/W 0
Always write "0".
Always write High-priority analog input channel select "0".
CMEN1 0 AD mode control register 4
AD Monitor function1 12BCH 0: Disable 1: Enable
CMEN0 0
AD Monitor function0 0: Disable 1: Enable
CMP1C CMP0C R/W 0 0
Generation condition of AD monitor function interrupt 1 0: less than 1: Greater than or Equal Generation condition of AD monitor function interrupt 0 0: less than 1: Greater than or Equal
IRQEN1 0
AD monitor function interrupt 1 0: Disable 1: Enable (Note)
IRQEN0 0
AD monitor function interrupt 0 0: Disable 1: Enable (Note)
CMPINT1 0
Status of AD monitor function interrupt 1 0: No generation 1: Generation
CMPINT0 0
Status of AD monitor function interrupt 0 0: No generation 1: Generation
ADMOD4
CMCH2 0 12BDH
ADMOD5
AD mode control register 5
CM1CH1 R/W 0
CM1CH0 0
CM0CH2 0
CM0CH1 R/W 0
CM0CH0 0
Select analog channel for AD monitor function 1 000: AIN0 100: AN4 001: AIN1 101: AN5 010: AIN2 110: Reserved 011: AN3 111: Reserved
Select analog channel for AD monitor function 1 000: AIN0 100: AN4 001: AIN1 101: AN5 010: AIN2 110: Reserved 011: AN3 111: Reserved
92CF26A-757
2007-11-21
TMP92CF26A
(19) Watchdog timer Symbol Name
Address
7
WDTE 1
6
WDTP1 R/W 0
5
WDTP0 0
4
3
2
I2WDT 0
1
RESCR R/W 0
0
-
WDMOD
WDT mode register
0
1300H
WDT control 1: Enable
Select detecting time 15 00: 2 /fIO 01: 2 /fIO 10: 2 /fIO 11: 2 /fIO
21 19 17
1:Internally Always IDLE2 connects write "0". 0: Stop WDT out to 1: Operate the reset pin
WDCR
WDT control register
1301H (Prohibit RMW) B1H: WDT disable code
-
W
-
4E: WDT clear code
92CF26A-758
2007-11-21
TMP92CF26A
(20) RTC (Real-Time Clock) Symbol
SECR
Name
Second register
Address
1320H
7
6
SE6
5
SE5
4
SE4
3
2
1
SE1
0
SE0
"0" is read MINR Minute register 1321H "0" is read Hour register
40 sec. MI6
20 sec. MI5
10 sec. MI4
40 min.
20 min. HO5
10 min. HO4
HOURR
1322H "0" is read 20 hours (PM/AM) 10 hours
SE3 SE2 R/W Undefined 8 sec. 4 sec. MI3 MI2 R/W Undefined 8 min. 4 min. HO3 HO2 R/W Undefined 8 hours 4 hours WE2
2 sec. MI1
1 sec. MI0
2 min. HO1
1 min. HO0
2 hours WE1 R/W Undefined W1 DA1
1 hour WE0
DAYR
Day register
1323H "0" is read DA5 W2 DA2
DA4
DA3
W0 DA0
DATER
Date register
1324H "0" is read 1325H PAGE0 PAGE1 "0" is read 10 month "0" is read 20 days 10 days MO4
R/W Undefined 8 days 4 days MO3 MO2 R/W Undefined 8month 4 month
2 days MO1
1 day MO0
2 month
1 month
0:Indicator for 12 hours 1: Indicator for 24 hours
Month MONTHR register
YE7 1326H PAGE0 PAGE1 80 years
YE6
40 years
YEARR
Year register
YE3 R/W Undefined 20 years 10 years 8 years "0" is read
YE5
YE4
YE2
YE1
YE0
4 years
2 years 00: Leap year
1 year
Leap year setting 01: One year after 10: Two years after 11: Three years after PAGE R/W Undefined "0" is read. PAGE selection
-
PAGER
Page register
1327H (Prohibit RMW) Interrupt 1: Enable
INTENA R/W 0 "0" is read
ADJUST ENATMR ENAALM W R/W Undefined Undefined 0: Don't care Clock 1: Enable ALARM 1: Enable
0: Disable DIS1HZ Reset register 1328H (Prohibit RMW) 1Hz 0: Enable
RESTR
1: Adjust 0: Disable 0: Disable DIS16HZ RSTTMR RSTALM - - - W Undefined Always write "0" 16Hz 1:Clock 1: Alarm 0: Enable reset reset
1: Disable 1: Disable
92CF26A-759
2007-11-21
TMP92CF26A
(21) Melody/alarm generator Symbol
ALM
Name
Alarmpattern register
Address
7
AL8
6
AL7 0 FC0 0
5
AL6 0 ALMINV 0 Alarm frequency invert 1: Invert
4
AL5 R/W 0
-
3
AL4 0
-
2
AL3 0
-
1
AL2 0
-
0
AL1 0 MELALM 0 Output frequency 0: Alarm 1: Melody
1330H 0 FC1 0 Free run counter 1331H control 00: Hold 01: Restart 10: Clear 11: Clear and start ML7 1332H 0 MELON R/W 0 0 0 0 ML6 ML5 ML4
Alarm pattern setting R/W Melody/ alarm MELALMC control register 0 0 0 0
Always write "0".
MELFL
Melody frequency L-register
ML3 R/W 0
ML2 0
ML1 0 ML9 R/W 0
ML0 0 ML8 0
Melody frequency set (Low 8bit) ML11 ML10 0 0
MELFH
Melody frequency H-register
Melody 1333H counter control 0: Stop and clear 1: Start
-
Melody frequency set (Upper 4 bits)
IALM4E 0 (1Hz) enable
ALMINT
Alarm interrupt enable register
IALM3E IALM2E R/W 0 (2Hz) enable 0 (64Hz) enable
IALM1E 0 (512Hz) enable
IALM0E 0 (8192Hz) enable
1334H
0 Always write "0".
1:INTALM4 1:INTALM3 1:INTALM2 1:INTALM1 1:INTALM0
92CF26A-760
2007-11-21
TMP92CF26A
(22) I2S (1/2)
Symbol Name Address 15
B015
14
B014
13
B013
12
B012
11
B011
10
B010
9
B009
8
B008
7
B007
6
B006
5
B005
4
B004
3
B003
2
B002
1
B001
0
B000
W IS TransmiI2S0BUF ssion Buffer Register0
1800H
2
Undefined Transmission buffer register (FIFO) (Prohibit RMW)
31 30
B031 B030
29
B09
28
B028
27
B027
26
B026
25
B025
24
B024
23
B023
22
B022
21
B021
20
B020
19
B019
18
B018
17
B017
16
B016
W Undefined Transmission buffer register (FIFO)
15 14
B115 B114
2
13
B113
12
B112
11
B111
10
B110
9
B109
8
B108
7
B107
6
B106
5
B105
4
B104
3
B103
2
B102
1
B101
0
B100
W Undefined
1810H
IS TransmiI2S1BUF ssion
Buffer Register1
(Prohibit RMW)
Transmission buffer register (FIFO)
31 30
B131 B130
29
B129
28 27
B128 B127
26
B126
25
B125
24
B124
23
B123
22
B122
21
B121
20
B120
19
B119
18
B118
17
B117
16
B116
W Undefined Transmission buffer register (FIFO)
92CF26A-761
2007-11-21
TMP92CF26A
(22) I2S (2/2) Symbol Name
Address
7
TXE0 R/W 0 Transmit 0: Stop 1: Start
6
*CNTE0 R/W 0 Counter control 0: Clear 1: Start
5
4
DIR0 R/W 0 -on start BIT 0:MSB 1:LSB FSEL0 R/W 0 Stereo /monaural 0: Stereo 1:Monaural
3
BIT0 R/W 0
2
R/W 0 Output format 00: I S
2
1
R/W 0
0
R/W 0 System clock 0:Disable 1:Enable
DTFMT01 DTFMT00 SYSCKE0
1808H
Transmissi Bit length 0: 8 bits 1:16 bits TEMP0 R 1
10: Right 01: Left 11:Reserved WLVL0 R/W 0 EDGE0 R/W 0
IS I2S0CTL Control Register0 CLKS0 R/W 0 1809H Source clock 0: fSYS 1: fPLL
2
CLKE0 R/W
Condition of WS level transmission 0:low left FIFO
0 Clock edge Clock enable for data 0:Rising 1:Falling
(After transmission)
0: data 1: None data CK03
1:high left output
0:Operate 1:Stop CK00 0 WS00 0
CK07 I S0 Divider Value Setting Register
2
CK06 0
CK05 0 WS05
CK04 R/W 0 WS04 0 DIR1 R/W 0
CK02 0 WS02 R/W 0
CK01 0 WS01 0
180AH 0
0 WS03 0 BIT1 R/W 0 0: 8 bits
I2S0C
Divider value for CK signal (8-bit counter)
180BH 0 TXE1 R/W 0 1818H Transmit 0: Stop 1: Start *CNTE1 R/W 0 Counter control 0: Clear 1: Start CLKS1 R/W 0 1819H Source clock 0: fSYS 1: fPLL
Divider value for WS signal (6-bit counter) DTFMT11 DTFMT10 SYSCKE1 R/W 0 Output format 00: I S 10: Right 01: Left 11:Reserved FSEL1 R/W 0 Stereo /monaural 0: Stereo 1:Monaural TEMP1 R 1 WLVL1 R/W 0 EDGE1 R/W 0 CLKE1 R/W
2
R/W 0
R/W 0 System clock 0:Disable 1:Enable
Transmissio- Bit length n start BIT
0:MSB 1:LSB
1:16 bits
IS I2S1CTL Control Register1
2
Condition of WS level transmission 0:low left FIFO
0 Clock edge Clock enable for data 0:Rising 1:Falling
(After transmission)
0: data 1: None data CK13
1:high left output
0:Operate 1:Stop CK10 0 WS10 0
CK17 I S1 Divider Value Setting Register
2
CK16 0
CK15 0 WS15
CK14 R/W 0 WS14 0
CK12 0 WS12 R/W 0
CK11 0 WS11 0
181AH 0
0 WS13 0
I2S1C
Set divide frequency for CK signal (8-bit counter)
181BH 0
Set divided frequency for WS signal (6-bit counter)
92CF26A-762
2007-11-21
TMP92CF26A
(23) MAC (1/2) Symbol
MACMA_LL
Name
Data register Multiplier A-LL Data
Address
7
MA7
6
MA6
5
MA5
4
MA4 R/W Undefined
3
MA3
2
MA2
1
MA1
0
MA0
1BE0H
Multiplier A data register [7:0] MA15 1BE1H MA14 MA13 MA12 R/W Undefined Multiplier A data register [15:8] MA23 1BE2H MA22 MA21 MA20 R/W Undefined Multiplier A data register [23:16] MA31 1BE3H MA30 MA29 MA28 R/W Undefined Multiplier A data register [31:24] MB7 1BE4H MB6 MB5 MB4 R/W Undefined Multiplier B data register [7:0] MB15 1BE5H MB14 MB13 MB12 R/W Undefined Multiplier B data register [15:8] MB23 1BE6H MB22 MB21 MB20 R/W Undefined Multiplier B data register [23:16] MB31 1BE7H MB30 MB29 MB28 R/W Undefined Multiplier B data register [31:24] OR7 1BE8H OR6 OR5 OR4 R/W Undefined Multiply and Accumulate data register [7:0] OR15 1BE9H OR14 OR13 OR12 R/W Undefined Multiply and Accumulate data register [15:8] OR23 1BEAH OR22 OR21 OR20 R/W Undefined Multiply and Accumulate data register [23:16] OR31 1BEBH OR30 OR29 OR28 R/W Undefined Multiply and Accumulate data register [31:24] OR27 OR26 OR25 OR24 OR19 OR18 OR17 OR16 OR11 OR10 OR9 OR8 OR3 OR2 OR1 OR0 MB27 MB26 MB25 MB24 MB19 MB18 MB17 MB16 MB11 MB10 MB9 MB8 MB3 MB2 MB1 MB0 MA27 MA26 MA25 MA24 MA19 MA18 MA17 MA16 MA11 MA10 MA9 MA8
MACMA_LH
register Multiplier A-LH Data
MACMA_HL
register Multiplier A-HL Data
MACMA_HH
register Multiplier A-HH Data
MACMB_LL
register Multiplier B-LL Data
MACMB_LH
register Multiplier B-LH Data
MACMB_HL
register Multiplier B-HL Data
MACMB_HH
register Multiplier B-HH Data register
MACOR_LLL Multiply and
Accumulate -LLL Data register
MACOR_LLH Multiply and
Accumulate -LLH Data register
MACOR_LHL Multiply and
Accumulate -LGL Data register
MACOR_LHH Multiply and
Accumulate -LHH
92CF26A-763
2007-11-21
TMP92CF26A
(23) MAC (2/2) Symbol Name
Data register
MACOR_HLL Multiply and 1BECH
Address
7
OR39
6
OR38
5
OR37
4
OR36 R/W Undefined
3
OR35
2
OR34
1
OR33
0
OR32
Accumulate -HLL Data register
MACOR_HLH Multiply and 1BEDH
Multiply and Accumulate data register [39:32] OR47 OR46 OR45 OR44 R/W Undefined Multiply and Accumulate data register [47:40] OR55 OR54 OR53 OR52 R/W Undefined Multiply and Accumulate data register [55:48] OR63 OR62 OR61 OR60 R/W Undefined Multiply and Accumulate data register [63:56] MOVF R/W 0 MOPST W 0 0 MSTTG2 MSTTG1 R/W 0 0 MSTTG0 MSGMD R/W 0 mode 1:Signed 0 Calculation Mode 01: 64 - 32 x 32 10: 32 x 32 - 64 11: Reserved MOPMD1 MOPMD0 R/W 0 OR59 OR58 OR57 OR56 OR51 OR50 OR49 OR48 OR43 OR42 OR41 OR40
Accumulate -HLH Data register
MACOR_HHL Multiply and 1BEEH
Accumulate -HHL Data register
MACOR_HHH Multiply and 1BEFH
Accumulate -HHH
MAC MACCR Control Register
Over flow Start 1BFCH flag flow 0:no over control
Select the trigger of start calculation Sign 001: Write to MACMB[7:0]
calculation 000: Write to MACMA[7:0]
0:Unsigned 00: 64 + 32 x 32
0:don't care 010: Write to MACMOR[7:0] 1: Start 1:generate 011: Write to MACMOR[39:32] calculation
over flow
1xx: Write "1" to
92CF26A-764
2007-11-21
TMP92CF26A
6.
Package
P-FBGA228-1515-0.80A5
TOP VIEW
BOTTOM VIEW
92CF26A-765
2007-11-21
TMP92CF26A
92CF26A-766
2007-11-21


▲Up To Search▲   

 
Price & Availability of TMP92CF26AXBG

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X